Locking problems with Access 2.0 and Visual Basic 4 
Author Message
 Locking problems with Access 2.0 and Visual Basic 4

Hi All,

Scenario.

Language Visual Basic 4
Database Access 2.0
Network: Novell 4.1

I am sure you have heard this before, but I am having a locking
problem within Access 2.0

I have an application, that is multi user (no more than 4 people),
linking to a normalised (well reasonably) Access database (about 8
tables).

During my application, I have a situation where a large number of
calls will be made to a certain table (the Availability table) to
update / add records.

The availability table is small with just:-

Person No, Date, Session (AM/PM) and Status (i.e. Available).

The users update a calendar in my code, and this takes the dates and
sessions in a loop and updates the table.

The problem I am having is that this is running INCREDIBLY slowly. In
addition, I am getting a lot of database locked problems.

Factors:-

The form in VB uses both Data Control's, but the actual code that has
the problem,uses a dynaset.

I have set the database to shared. both in Access and VB (in the
cotrols).

I have put error code conditions in to make it retry, but it is still
a nightmare.

Is there anything anyone can think of the can help this application,
as the performance of it is pathetic at the moment.

Also, could there be anything in Novell that may need improving.

Many Thanks in advance for any help, anyone can offer.

BTW: Could any answer's be emailed to me, as I can't take this group
regularly.

Again Thanks

Russ
R & L Enterprises - Software/ Hardware Development & Distribution
M.L. Greenwood's & Associates - Business & Technical Consultancy



Fri, 19 Mar 1999 03:00:00 GMT  
 Locking problems with Access 2.0 and Visual Basic 4

Quote:

<snip>
> I have put error code conditions in to make it retry, but it is still
> a nightmare.

<snip>

How are you retrying?  This might be the problem.
I have a database with about 10 users making about 200 inserts
in an 8 hour day while another user moves the inserts to our
SQL server.  My first try had something like this:

...
Post_Claim_Error:
If InStr(UCase(Error),"LOCK") > 0 Or InStr(Error, "-3034") > 0 Then
Resume
...

This will kill everything!
I made this change and now everything works fine:

...
Post_Claim_Error:
If InStr(UCase(Error), "LOCK") > 0 Or InStr(Error, "-3034") > 0 Then
    If MsgBox(Error, 5) = 4 Then Resume          'try again
End If
...

This will display a message saying someone has the table locked, they
can then click resume or cancel.  By the time they click resume the
other person should be done.

Steven

--


Texas Department of Health,                      home (512) 453-2317
WIC Automation                              work (512) 458-7111x3476
http://www.netcom.com/~sdrinovs                 pager (512) 403-8453
My opinions are my own and by no means represent the state of Texas.
--
I think so, Brain, but if we didn't have ears, we'd look like weasels.
        -Pinky from Pinky and the Brain.



Sat, 20 Mar 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem Updating An Access 2.0 Database From Visual Basic 4.0

2. Visual basic 3.0 accessing Access 2.0 databases

3. MS Access 2.0/MS Jet 2.0 Locks

4. Custom Locking code for Database Locked in VB4 with Access 2.0 - HELPPPPPP

5. HELP! Access 2.0 Record Locking Problems

6. Problem with locks- VB5, Access 2.0 and Seek

7. Problem with locks - VB5, Access 2.0 and Seek

8. convert Access 2.0 .mdb to Visual Basic .exe

9. Visual Basic 6.0 Access 2.0

10. Performance comparison Visual Basic 3.0 vs MS ACCESS 2.0

11. Visual Basic 4.0 & Access 2.0

12. Visual Basic 16 bit and Access 2.0 Crashes

 

 
Powered by phpBB® Forum Software