Caching in jet - db (CDaoDatabase)
From: Günter Prossliner (gpointprossliner_at_removegmx.at)
Date: 08/27/04
- Previous message: Graham: "RE: CDatabase vs. ADO"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 27 Aug 2004 10:30:16 +0200
Hi Newsgroup!
I'm currently in the development of an app witch uses the MFC - Dao Database
classes. Verything works fine, but I have a single question:
The App processes records in a sequal order. The running nummer of the
record witch has been processed is saved into a table within the database.
Becaurse there can be very many records within a sort period of time (can be
up to 250/sec), and every each record has completed the running number is
written with an UPDATE statement, there are many database operations within
a small amout of time.
example code (simplified):
void SetNr(int nr){
CString sql;
sql.Format(_T("UPDATE table SET nr=%i"), nr);
m_daoDb->Execute(sql);
}
It seems that the write operations is cached by the CDaoDatabase, or the
underlying dao api in any way. If I step through the code with the debugger,
i can't see the changes when I open the mdb with access. It takes some time
until I can see the actual changes. This is the expected behavior, I think
it's good that there is a kind of caching, with avoid to unessersary
db-operations and IO.
Is this behavior documented in any way? This is very important, otherwise I
have to implement such a behavior myself.
What if the app crashes before the changes are actually written to the db?
Are they lost?
thank you!
Günter Prossliner
- Previous message: Graham: "RE: CDatabase vs. ADO"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|