jadams0173
Technical User
- Feb 18, 2005
- 1,210
I'm using VB6 and A2K with ADO. I'm trying to lock a table or a record in the table until the current user is done with it. I'm attempting to make an autonumber field. The table in question only has one record in it.
Would I be better off adding a locked check box and checking it that way?
I've read some FAQ's but the one i saw used DAO.
Here is what I've tried.
Here is my connection string.
I tried to have patience but it took to long!
-DW
Would I be better off adding a locked check box and checking it that way?
I've read some FAQ's but the one i saw used DAO.
Here is what I've tried.
Code:
Set rs = New ADODB.Recordset
Set rs2 = New ADODB.Recordset
rs.Open "Select fixtureid from tblFixtureID", conn, adOpenKeyset, adLockPessimistic, adCmdText
'rs.EditMode
rs.Fields("fixtureid") = 2000
rs2.Open "Select fixtureid from tblFixtureID", conn, adOpenKeyset, adLockPessimistic, adCmdText
rs2.Fields("fixtureid") = 5000
Set rs = Nothing
Set rs2 = Nothing
conn.Close
Set conn = Nothing
Here is my connection string.
Code:
With conn
.CursorLocation = adUseClient
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\MYDB.mdb;" & _
"Jet OLEDB:Database"
.Open
End With
I tried to have patience but it took to long!