Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to lock connection at the time of updation..
I install my sw on 3 pc. database is on server. sometimes records not get updated.. I want it lock the record at the time of updation.
this is my code....

con.BeginTrans()
strSQL = "Update indian set prfrnc='" & txtprfnc.Text & "' where MRN=" & txtmrn.Text & ""

con.Mode = ADODB.ConnectModeEnum.adModeShareDenyWrite
con.Execute(strSQL).LockType = ADODB.LockTypeEnum.adLockOptimistic
con.CommitTrans()


.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900