Marc Lisketing
May 13th, 1999, 06:02 AM
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
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