|
-
May 13th, 1999, 01:47 PM
#1
Hi! Is there anyone out there how can tell me how record lockting with DAO works. REWARD: 1 beer ca
Hi everyone!
When I use the Edit()-Methode to lock a recordset in a pessimistic-opened CDaoRecordset, the Edit()-Methode seemed to look more than
one record! Does anybody know, why the Edit()-Method looks more than the current record? I would be nice I anyone will reply immediately
because I will have to install this programm on Monday!
DB.Open("d:\\projekte\\dblock\\dblock.mdb", FALSE, FALSE);
pOrder = new CDaoRecordset(&DB);
pOrder->Open(dbOpenDynaset, "select * from order order by order_nr", dbSeeChanges);
pOrder->SetLockingMode(TRUE);
pOrder->MoveLast();
// Lock the current record! (or more?!)
try {
pOrder->Edit();
}
catch (CDaoException* e) {
if(e->m_pErrorInfo->m_lErrorCode == 3260) {
//...record is locked!
}
}
When I start two applications on my system this works fine. The second application recognize that the last record is locked.
But when I scroll forword in the second application, the previous 4 or 5 records are locked too. But there wqs only
the last record locked by the first application! I tried to turn off the DAO-record caching by the following statements:
pOrder->SetCacheSize(0);
pOrder->SetCacheSize(0);
pOrder.>FillCache();
But this didn´t work too.
I´m looking forward to any ideas, suggestions or what ever!
Thanks!
Marc
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
|