code placement

  • Thread starter Thread starter Jan T
  • Start date Start date
J

Jan T

Hi guys,

I have created a database that runs over a big net work some times I get a
message "Could not update; record locked" I have found a solution which is
as follows

Dim cn As New ADODB.Connection
cn.CursorLocation = adUseClient

The problem is where do I put this bit of code so that it will work. I have
some knowledge of VB for applications but sometimes I just don't know where
to put stuff I have found on the net. If anybody has a better fix then
please let me know.

Thanks in advance.
 
Jan T said:
Hi guys,

I have created a database that runs over a big net work some times I get a
message "Could not update; record locked" I have found a solution which is
as follows

Dim cn As New ADODB.Connection
cn.CursorLocation = adUseClient

The problem is where do I put this bit of code so that it will work. I
have
some knowledge of VB for applications but sometimes I just don't know
where
to put stuff I have found on the net. If anybody has a better fix then
please let me know.

Thanks in advance.


I am trying to find a polite suggestion as to where to insert that bit of
code...
But seriously... do you really expect a magical two lines of code to be the
solution to tuning a multi-user database? Realistically you need to first
pin down when this is happening. Is it using a particular form, is it
likely that 2 users are indeed trying to update the same record? Then you
could start to give more technical details - what version of Access, how
have you configured the multi-user setup, are you using bound forms, are you
using optimistic or pessimistic locking are you using record-level locking?
Anyway the first task must be to see if you can accurately reproduce the
problem, then report back as to how it happened.
 
Brian,
I am using access 2000 and have not set any locking specifications.
What is pessimistic , optimistic or record level locking and if I use any of
these locking procedures then what happens.
Sorry to sound dumb but this is the first time I have built a multi user
database of this size and it is worrying me.
The locking of records happens much more often if the system has slowed
down. The other day one of the servers went down and the system was very
slow then the "currently locked" happened much more often. Could it be the
network causing problems as well.
Thankyou for the assistance so far.
Jan T
 
Jan T said:
Brian,
I am using access 2000 and have not set any locking specifications.
What is pessimistic , optimistic or record level locking and if I use any
of
these locking procedures then what happens.
Sorry to sound dumb but this is the first time I have built a multi user
database of this size and it is worrying me.
The locking of records happens much more often if the system has slowed
down. The other day one of the servers went down and the system was very
slow then the "currently locked" happened much more often. Could it be the
network causing problems as well.
Thankyou for the assistance so far.
Jan T




Hi Jan
Whilst I really would like to write a definitive guide, it's currently a bit
late for me at the moment. This stuff is fairly well discussed on the web
and things like optimistic/pessimistic locking are really pretty fundamental
to designing multi-user databases.
Perhaps someone else will be able to comment, but I would still return to my
first point: Can you (possibly with the assistance of a colleague at
another machine) reproduce this error? We could certainly help to try and
fix a concrete, reproducible error.
 
Back
Top