Using LOCK ine the ADP project

T

TF

Hello,
I use the File->Connection once for connection the ADP to Sql Server (or to
MSDE).
in the VBA modules, every connection is the "ActiveConnection =
CurrentProject.Connection".

For records updating or insertion or deletion, I use the Stored procedures
which developed for
Every thing work good.

But I don't use any record lock in this ADP !
For multi user : have I use a lock ? how ?
thank you
 
V

Vadim Rapp

Hello TF:
You wrote on Mon, 7 Jun 2004 08:16:47 +0200:

T> But I don't use any record lock in this ADP !

ADP uses only client-side cursors for all bound objects, thus, no locks and
no transactions.

T> For multi user : have I use a lock ? how ?

Client-side cursors provide sort of pseudo-locking: if the user opens a
record, and while he is working with it, another user modifies this record
in the database, then, when the 1st user tries to upload his work back to
the database, Access notices it and warns that the record was changed by
someone else while you were working with it.

Vadim
 
T

TF

Thanks
Do I have something : add a lock command or do nothing then Access notify
the user ?.
 
V

Vadim Rapp

Hello TF:
You wrote on Tue, 8 Jun 2004 07:52:24 +0200:

T> Do I have something : add a lock command or do nothing then Access
T> notify the user ?.

I'm not sure what do you mean by lock command. There does not seem much you
can do - Access does everything here as it wants.

Vadim
 
V

Vadim Rapp

Hello TF:
You wrote on Wed, 9 Jun 2004 10:29:40 +0200:

T> I mean, if I fix somewhere a lock like "adLockOptimistic" or another one

The only way you have have true locks in the database, is using pessimistic
locking of the recordset. Access won't let you do that with its own
recordsets.

Of course, you can make all your forms unbound and manipulate the data
between controls and database "manually", using ADO recordsets you create by
yourself. But then, it's already not so much of Access, it's rather VB: you
will have to program everything Access normally does for you, including
populating comboboxes, scrolling, etc.

In one of my projects, I implemented the following. If user A opens order X,
and then user B is trying to open the same order X, user B receives the
message: "User A is working with this order, his phone # is xxx. Proceed or
cancel?" This is done with UDP broadcast of the intention to open order X,
to which another workstation working with order X responds.

regards,

Vadim
 
T

TF

Do you create a special table for coding the users action ?
Or you use some internal functions of Sql Server?
Thanks
 
V

Vadim Rapp

Hello TF:
You wrote on Thu, 10 Jun 2004 22:03:34 +0200:

T> Do you create a special table for coding the users action ?
T> Or you use some internal functions of Sql Server?

You mean, the way I notify? Neither, everything is in code, using MS winsock
control.

Vadim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top