Caching in jet - db (CDaoDatabase)

From: Günter Prossliner (gpointprossliner_at_removegmx.at)
Date: 08/27/04


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



Relevant Pages

  • CDaoDatabase - caching
    ... I'm currently in the development of an app witch uses the MFC - Dao Database ...
    (microsoft.public.vc.mfc)
  • Re: Portable Database Choice
    ... I searched this group quite a bit looking for database alternatives and did find the options below from this search. ... I'm posting this in the hope it can be of use to other developers in a position similar to mine where I needed a low cost alternative to Pocket Access. ... One app requires synchronization between desktop and mobile device, the other requires a push of data from the desktop to mobile. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Portable Database Choice
    ... > database alternatives and did find the options below from this search. ... One app requires ... > push of data from the desktop to mobile. ... > Both of these apps used Pocket Access on the device with Peter Foot's ...
    (microsoft.public.dotnet.framework.compactframework)
  • Portable Database Choice
    ... database alternatives and did find the options below from this search. ... of data from the desktop to mobile. ... The read-only app requires speedy lookup of data in a flat table ... Both of these apps used Pocket Access on the device with Peter Foot's ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Sqlserverce class not working when VB.Net application is running from network drive
    ... one app attempts to connect to a sdf file on a network share, ... possible that the database is already in use when you attempt to ...
    (microsoft.public.sqlserver.ce)

Loading