Value / row level locking with disconnected recordsets

Value / row level locking with disconnected recordsets

Post by Dale Ree » Thu, 25 Mar 1999 04:00:00



Using VB6-SP2, ADO2.0, SQL7, MTS.

I've got a disconnected recordset (static cursor, batchoptimistic).
When I do an updatebatch, it checks the values in the underlying table
against those in the database.  As you would expect, if any of them have
changed it doesn't allow you to update the record.

This can be slow on some tables that contain a lot of fields.  Within SQL,
you can add a timestamp to the table, then use that for checking instead,
known as optimistic using rows.  This then only checks to see if the
timestamp has changed, which makes the whole thing quicker and more secure.

My problem is that despite adding the timestamp to the table, updatebatch
still seems to be performing an optimistic using values type update.  I
cannot find anything in MSDN etc that tells me how to get the cursor to use
row checking instead of values.  Can someone tell me how?  MSDN describes it
for FoxPro, but not for VB6, which I'm using.

 
 
 

Value / row level locking with disconnected recordsets

Post by JRSte » Thu, 01 Apr 1999 04:00:00


On Wed, 24 Mar 1999 10:40:52 -0000, "Dale Reed"


>My problem is that despite adding the timestamp to the table, updatebatch
>still seems to be performing an optimistic using values type update.

I thought it was automatic, not that the documentation really says
anything.  Did you select the timestamp field into your recordset?

Joshua Stern


 
 
 

1. Value / row level locking with disconnected recordsets

Using VB6-SP2, ADO2.0, SQL7, MTS.

I've got a disconnected recordset (static cursor, batchoptimistic).
When I do an updatebatch, it checks the values in the underlying table
against those in the database.  As you would expect, if any of them have
changed it doesn't allow you to update the record.

This can be slow on some tables that contain a lot of fields.  Within SQL,
you can add a timestamp to the table, then use that for checking instead,
known as optimistic using rows.  This then only checks to see if the
timestamp has changed, which makes the whole thing quicker and more secure.

My problem is that despite adding the timestamp to the table, updatebatch
still seems to be performing an optimistic using values type update.  I
cannot find anything in MSDN etc that tells me how to get the cursor to use
row checking instead of values.  Can someone tell me how?  MSDN describes it
for FoxPro, but not for VB6, which I'm using.

2. Earn Upwards of $10000 per month

3. table-level lock or row-level lock

4. Performance hit

5. row-level or page-level locking?

6. sql 6.5 enterprise manager

7. row level vs page level locking is it more than marketing

8. Problem terminating my Application

9. row level locking and dead-lock prevention

10. Page lock to simulate row level lock

11. Paradox 5.0: Row level locking or page locking?

12. table level locks, row level locks, column level locks?