Home > Microsoft Access Help > lock Access Database

lock Access Database



Dear All,



what I need to do is the following:-



1) Open a table to insert a new record

2) Lock this table so there is no new entries in it

3) get the maximum call number and add 1 to it

4) insert the new record

5) Unlock the table again.



How can i do it? I know how to insert the record and get the maximum call number. What i do not know is how to lock and unlock the table.



Thanks for your help and time

    
Guest


Are you wanting to do this via code?



I know you can do this with ADO. You can specify a lock type. See this article:



http://www.aspalliance.com/aspxtrem...s.aspx?pageno=3

Was this answer helpful ? Yes No   
Guest


So you're just adding 1 to the primary key? Why not just use the autonumber field provided by access? You just insert the record and then it handles the rest for you and you dn't have to deal with locking the database, it's also much more secure/easier to code.

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved