|
-
May 11th, 2004, 09:48 PM
#1
Record locking
Hi
I nned to know about record locking
I opened a connection with
adUseServer
and I opened a recordset with
adOpenDynamic and
adLockPessimistic
When another user try to open same record set, How do we check the record lock status
Thnk u in advance
Dinesh
-
May 13th, 2004, 10:16 AM
#2
Record Lock Help ?
I use adLockPessimistic to open a record set.
How do I know weather the selected record is locked by another person.
If any body can show me an link to learn Multiuser programming with SQL server and VB 6.
Thank you.
Dinesh
Last edited by dineshns; May 13th, 2004 at 10:26 AM.
-
May 14th, 2004, 04:29 AM
#3
these could help:
http://www.sas-software.nl/devcon/AdoAdvanced.pdf
http://www.vbmysql.com/articles/cursorsandlocks.html
(from second link)
In a situation of high concurrency, with multiple users modifying
the same data, you may need a pessimistic lock type.
With asLockPessimistic, the underlying rows (or table) will be
locked as soon as you begin making changes to the current
record, and will not be unlocked until the Update method is
called.
Thus, another process trying to update same record will fail.
Trap error.
Last edited by Cimperiali; May 14th, 2004 at 04:32 AM.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
May 14th, 2004, 09:10 AM
#4
Thanks, and another Help
Thank u for Help
ex.. Sombody (Another User) has Open a recordset with LockPessimistic.
My Problem is, When I am going to open the same record, It gives "Time out error" After 25-30 seconds. Aplication Freeses for 30 seconds.
Is there any way to Check the recordset weather Is it locked or not before openning?
Thank u.
Bye
-
May 14th, 2004, 09:25 AM
#5
Please Help me?
Thank u for Help
ex.. Sombody (Another User) has Open a recordset with LockPessimistic.
My Problem is, When I am going to open the same record, It gives "Time out error" After 25-30 seconds. Aplication Freeses for 30 seconds.
Is there any way to Check the recordset weather Is it locked or not before openning?
Thank u.
Bye
-
May 14th, 2004, 10:46 AM
#6
There should be a sys table where all locked objects are listed...
try searching help for sysObj on your Db...
Last edited by Cimperiali; May 19th, 2004 at 10:42 AM.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|