471,896 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,896 software developers and data experts.

Record retrieval problem

I have the following code snippet:

sql = "select * from customer where code = 'abc'"
With rs
.Open sql, conn, adOpenDynamic, adLockPessimistic,
If Not .EOF Then
' --- Force edit mode ---
!Code = "def"
' --- Add key field(s) first ---
!Code = "def"
End If
End With

and run the program twice to test the locking function.
Suppose the 1st instance is editing the record 'abc'.
When the 2nd instance tries to retrieve the same record at
the Open statement, no error occurs and instead set the
EOF property to True automatically, making the program
thinks that there is no such record. Can I make the Open
statement fails with error when there is another user
the same record? Any help or suggestion will be

Jul 20 '05 #1
0 1544

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Rick | last post: by
1 post views Thread by Lyle H. Gray | last post: by
1 post views Thread by Ryker | last post: by
12 posts views Thread by grace | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.