Hello!<BR><BR>I&#039m developing ASP&#039s with VBScript in MS Visual Interdev with an MSAccess database on the back-end.<BR><BR>I want to create my own primary keys instead of MSAccess creating them with an AUTONUMBER field.<BR><BR>I&#039ve created a table called NextAvailIDs as follows:<BR><BR>IDNAME IDNUMBER<BR>OrderID 1<BR>ItemID 1<BR><BR>My question is as follows:<BR><BR>How do I increment this IDNUMBER using ASP&#039s, ADO and VBScript in a multi-user environment? Does it have to be done with the Recordset object and SQL, or is there a way to call a query within MSAccess? How would I go about error trapping to make it keep looping for about 10 tries or so (the Errors object)? I have to be concerned with locking, so no two users can grab the same IDNUMBER.<BR><BR>My goal is to do the following on the table:<BR><BR>1. Lock table NextAvailIDs<BR>2. Read table for requested IDNAME<BR>3. Increment the IDNUMBER by one<BR>4. Update table with incremented IDNUMBER<BR>5. Unlock table<BR><BR>Also, would it be more efficient to break this NextAvailIDs table into seperate tables? (new tables would be NextOrderID, NextItemID, etc)<BR><BR>The more detail you can provide, the better off I will be. I&#039ve researched this for some time and have come up empty with specifics.<BR><BR>Thanks in advance for all your help.<BR><BR>-Rick<BR><BR><BR>