How to do record/row level locking? 
Author Message
 How to do record/row level locking?

Hi, All

Is there anybody know how to do the record/row level locking instead of
page-locking? Could you pls provide some sample code of how to do it?

My case is when I am doing update table, I don't want to lock the whole
table/page, because I need other persons have the access to read the
other records in the same table.

If it's possible, could you pls tell me how to do it in VB?

Thanks a lot.



Sat, 22 Jun 2002 03:00:00 GMT  
 How to do record/row level locking?
If you are using ADODB then you should be able to open a recordset using the
adOpenDynamic and a locktype of adLockOptimistic

I don't know for a fact which Dbs support row-level locking...


Quote:
> Hi, All

> Is there anybody know how to do the record/row level locking instead of
> page-locking? Could you pls provide some sample code of how to do it?

> My case is when I am doing update table, I don't want to lock the whole
> table/page, because I need other persons have the access to read the
> other records in the same table.

> If it's possible, could you pls tell me how to do it in VB?

> Thanks a lot.



Sat, 22 Jun 2002 03:00:00 GMT  
 How to do record/row level locking?
What database engine are you using?

--
Rebecca Riordan
{*filter*} River Solutions
Author of Designing Relational Database Systems
http://www.*-*-*.com/


Quote:
> Hi, All

> Is there anybody know how to do the record/row level locking instead of
> page-locking? Could you pls provide some sample code of how to do it?

> My case is when I am doing update table, I don't want to lock the whole
> table/page, because I need other persons have the access to read the
> other records in the same table.

> If it's possible, could you pls tell me how to do it in VB?

> Thanks a lot.



Sat, 22 Jun 2002 03:00:00 GMT  
 How to do record/row level locking?

Hi, All

Is there anybody know how to do the record/row level locking instead of
page-locking? Could you pls provide some sample code of how to do it?

My case is when I am doing update table, I don't want to lock the whole
table/page, because I need other persons have the access to read the
other records in the same table.

If it's possible, could you pls tell me how to do it in VB?

If you are talking about Access then I think you'll need to use 2000.

Paul
~~~~



Sat, 22 Jun 2002 03:00:00 GMT  
 How to do record/row level locking?
Actually you can get record-level locking using Jet/DAO3.5x!  You do not
need to use Jet4.

MS says no, but reality is otherwise (gee, another big surprise <g>)

It was demonstrated & documented in the June 1999 issue of Windows
Developer's Journal (www.wdj.com) and involves setting a single flag on the
creation of the recordset and the one restriction is that the recordset may
contain no more than one record.

I would pass the code along here and now but:

1) It was someone else's tip

2) I seem to have misplaced that issue (I was just reading over that same
bit of code a couple of days ago and don't know where i put it.  sorry).

But go to the wdj site and look up the issue's contents, it was on page 67 I
believe.

It's a good one.  Just a few lines of DAO and well worth the price of the
back issue.

-Robert Smith
Kirkland WA
www.smithvoice.com/vbfun.htm

Quote:
> If it's possible, could you pls tell me how to do it in VB?

>If you are talking about Access then I think you'll need to use 2000.

>Paul
>~~~~




Sat, 22 Jun 2002 03:00:00 GMT  
 How to do record/row level locking?
What kind of database are you locking?  That would certainly help.  Are
you locking dbase?  Access?  Oracle?  Foxpro?  We got to have the full
information here!!

Sent via Deja.com http://www.deja.com/
Before you buy.



Sun, 23 Jun 2002 03:00:00 GMT  
 How to do record/row level locking?

It was demonstrated & documented in the June 1999 issue of Windows
Developer's Journal (www.wdj.com) and involves setting a single flag on the
creation of the recordset and the one restriction is that the recordset may
contain no more than one record.

One row in the Recordset? I think that's why MS says "No". ;-)

Paul
~~~~



Mon, 24 Jun 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Access 97 Row-Level Record Locking

2. How to do record/row level locking

3. row-level locking with dao and access 2000

4. Command Object vs Connection Object for Row Level Locking

5. Command Object vs Connection Object for Row Level Locking

6. Row Level Locking Help???

7. Row level locking with an Access 97 DB ?

8. Row Level Locking

9. How do I apply row-level locking in SQL server with ADO

10. DB2 & VB Row Level Locking

11. Row-Level locking in Access 2002 e VB6

12. Command Object vs Connection Object for Row Level Locking

 

 
Powered by phpBB® Forum Software