By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,883 Members | 2,037 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,883 IT Pros & Developers. It's quick & easy.

VB6 Runrime error Could not Update currently locked

100+
P: 134
Hi, I am using ADO, sometime I got an error message Could not update currently lock, and sometime I don;t . Error stop in last sentence "Rsumm.Update" , Before exit the program I have use rsumm.close and
set rsumm = Nothing

I am lost could someone advise me.


Set rs = New Recordset
rs.LockType = adLockPessimistic
rs.CursorType = adOpenDynamic
rs.CursorLocation = adUseClient
rs.ActiveConnection = conn
rs.Open "Select * from Process where SN = '" & txtSN & "'", conn

Set rsSumm = New Recordset
rsSumm.LockType = adLockPessimistic
rsSumm.CursorType = adOpenDynamic
rsSumm.CursorLocation = adUseClient
rsSumm.ActiveConnection = conn
rsSumm.Open "Select * from Summary where SN = '" & txtSN.Text & "'", conn






If Option3 = True Then
rs("Failurecode") = txtFailure
rs("Measure1") = txtComponent
rs("Repair1") = txtComponent
rs("Repair1By") = UserID
rs("Repair1Date") = Now()
rs("Measure1Date") = Now()
rs("Measure1By") = UserID
rs("NextProcess1") = "Debug2"
rs.update
rsSumm("Process") = "Debug2"
rsSumm("Status") = "WIP"
rsSumm("CurrentDebug") = 1
rsSumm.update
End If
Jul 13 '08 #1
Share this Question
Share on Google+
4 Replies


debasisdas
Expert 5K+
P: 8,127
is it such that multiple users are trying to execute some DML on the same database table ?
Jul 14 '08 #2

100+
P: 134
is it such that multiple users are trying to execute some DML on the same database table ?
No, I am the only one using , it just pure ms access database
Jul 14 '08 #3

debasisdas
Expert 5K+
P: 8,127
is there any relationship between both the recordsets ?

Try to use rs.addnew or rs.edit before using rs.update .
Jul 14 '08 #4

100+
P: 134
is there any relationship between both the recordsets ?

Try to use rs.addnew or rs.edit before using rs.update .
No relationship, It only show rs.editmode no rs.edit, could you explain a bit more ? I cannot rs.edit it display method or data not found.
Jul 14 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.