Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB + Access Options

Status
Not open for further replies.

kovas

Technical User
Aug 6, 2002
88
US
When I open my access database, how do I set the options Default Record Locking = Edited Record and Number of Update Retries = 0 ?

thanks
 
Are you trying to do this in Access or Visual Basic? In Access you'd just go to Tools--Options--Advanced tab and set the options there.
 
In vb, i know how to do this in access...i am trying to do this in vb when i open the database.

DBConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Database.mdb;Persist Security Info=False"

 
Within the recordset you open you can define edited record locking (pessimistic locking)...not sure how you would do the number of retries.

objRec.Open "Select * FROM table1",objConn,adOpenDynamic,adLockPessimistic,adCmdText
 

For the 1st question, see the "Mode" property of the
connection object.

For the second, set the JET property "Jet OLEDB:Lock Retry" and "Jet OLEDB:Lock Delay" (via the Properties collection of the connection object) to the desired amount. [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top