469,281 Members | 2,450 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,281 developers. It's quick & easy.

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 1506

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
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.