Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_ado_rds thread: Locking Access records in an ASP page


Message #1 by "sara" <fillet70@h...> on Sun, 16 Feb 2003 16:51:23
Hi,
    I'm using ASP with ADO to connect to an Access databse. I want to lock 
the record on an sql update statement .
I dont want to lock the recordset(using the optimistic and pessimistic 
parameters). I come from a Sybase/DB2 background. With these databases, 
the update issues an exclusive lock and the developer does not have to 
specifically mention anything in the update statement. Is this true for 
Access as well ?
I'm using Access 97 and i believe it does not support record level locking 
and i need Access 2000 ? Is this correct ?

I plan to update my record as follows..
For example, create a LastUpdatedTimestamp field in every table. Whenever 
i retrieve records from the DB, i also extract this datestamp field and 
pass it back to the client. When the changes from the client are sent back 
to the DB, check the datestamp extracted with the datestamp in the DB. If 
they are the same, then no one has changed the data in the interim. If 
they are different, then someone else has changed the data in the interim, 
so an error message will be displayed to the user.

On a Select statement, i'm assuming the DBMS will issue a shared lock 
which will allow multiple users to read the same data. 

Please let me know if my assumptions are correct ?

Regards,
Sara

  Return to Index