ACCESS update via MFC ( VC++ 4.2) classes using ODBC 
Author Message
 ACCESS update via MFC ( VC++ 4.2) classes using ODBC

Hi!

I was wondering if someone could help me with this problem!

I'm accessing MSACCESS 7.0 via the MFC classes(using ODBC 3.0 ) from a
C++ program ( on NT4.0). The problem is that whenever I call
CRecordset->Update() on the table/recordset in the program, the update
to disk does not happen synchronous(i.e. not when the function returns).
Only after some time does the ODBC driver update the database!!!

How can I control this, so that upon returning from the function
CRecordset->Update() call, the update to physical disk is completed?? Or
can I flush some buffers, etc.???

I would be grateful for any suggestions, and replies!!!!  

Thanks :-)

Preben



Tue, 06 Jul 1999 03:00:00 GMT  
 ACCESS update via MFC ( VC++ 4.2) classes using ODBC

Quote:

> Hi!

> I was wondering if someone could help me with this problem!

> I'm accessing MSACCESS 7.0 via the MFC classes(using ODBC 3.0 ) from a
> C++ program ( on NT4.0). The problem is that whenever I call
> CRecordset->Update() on the table/recordset in the program, the update
> to disk does not happen synchronous(i.e. not when the function returns).
> Only after some time does the ODBC driver update the database!!!

> How can I control this, so that upon returning from the function
> CRecordset->Update() call, the update to physical disk is completed?? Or
> can I flush some buffers, etc.???

> I would be grateful for any suggestions, and replies!!!!

> Thanks :-)

> Preben

Call Requery()


Wed, 07 Jul 1999 03:00:00 GMT  
 ACCESS update via MFC ( VC++ 4.2) classes using ODBC

Quote:


> > Hi!

> > I was wondering if someone could help me with this problem!

> > I'm accessing MSACCESS 7.0 via the MFC classes(using ODBC 3.0 ) from a
> > C++ program ( on NT4.0). The problem is that whenever I call
> > CRecordset->Update() on the table/recordset in the program, the update
> > to disk does not happen synchronous(i.e. not when the function returns).
> > Only after some time does the ODBC driver update the database!!!

> > How can I control this, so that upon returning from the function
> > CRecordset->Update() call, the update to physical disk is completed?? Or
> > can I flush some buffers, etc.???

> > I would be grateful for any suggestions, and replies!!!!

> > Thanks :-)

> > Preben
> Call Requery()

Hi, again!

I do call CRecordset->Requery() before I try to read the
database, and in the same application this results in a successfull
update. BUT for a client application( running on a different machine),
the update does not seem to have happened. I think the updated recordset
is keept in a cache on the updating machine or that the update actually
is asynchronous.....??? There should be a way to flush this result to
disk or make the update synchronous!!!??????

Thanks!



Fri, 09 Jul 1999 03:00:00 GMT  
 ACCESS update via MFC ( VC++ 4.2) classes using ODBC


Quote:

>I do call CRecordset->Requery() before I try to read the
>database, and in the same application this results in a successfull
>update. BUT for a client application( running on a different machine),
>the update does not seem to have happened. I think the updated recordset
>is keept in a cache on the updating machine or that the update actually
>is asynchronous.....??? There should be a way to flush this result to
>disk or make the update synchronous!!!??????

There's a regsitry setting for the Jet Engine called PageTimout. This
is the time in ms that Jet waits before checking to see if data in the
internal cache has been changed by another process. In Access2 the
default was 50, or 1/2 seconds. In Access95, the default is 5000, or
5 seconds. There's a KB article about this, but I couldn't find it
just now.

Jeff



Sun, 11 Jul 1999 03:00:00 GMT  
 ACCESS update via MFC ( VC++ 4.2) classes using ODBC

Quote:

> There's a regsitry setting for the Jet Engine called PageTimout. This
> is the time in ms that Jet waits before checking to see if data in the
> internal cache has been changed by another process. In Access2 the
> default was 50, or 1/2 seconds. In Access95, the default is 5000, or
> 5 seconds. There's a KB article about this, but I couldn't find it
> just now.

> Jeff


Thanks, ....again :-)

I've tried to set the pagetimout to one ( the smallest value allowed ),
and also to set the buffer size to zero ( from 512 Kb). This should
cause the ODBC to flush/write through at once...but no such luck. It
still does not work. So somewhere it is still caching!! I'm wondering if
the caching done by the OS for the DB engine filepointer is stopping
this update from beeing instantaneous ....????

Well, anyways. I think I'm down to trying to flush any buffer ( either
ODBC buffers or file buffers ) just to get a write-through...

hope it works!

Thanks..

Preben



Mon, 12 Jul 1999 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Accessing access via MFC Database classes and ODBC

2. Accessing access via MFC Database classes and ODBC

3. Accessing access via MFC Database classes and ODBC

4. Accessing an Ms Access 2000 Query using VC++, via ODBC

5. SQL 6.5 tempdb error 1101 - VC++ 4.2 w MFC ODBC

6. Problems with updating an Access 2000 database using CDatabase and CRecorset-derived class in MFC

7. Access violations using DAO with VC 4.2

8. Help: Using MFC ODBC classes to access SQL BLOBs

9. Using HTML help with VC 5.0 and MFC 4.2

10. Is it possible to access Visual FoxPro5.0 tables directly from VC++ MFC(without using ODBC)

11. Query db using MFC via ODBC

12. Updating or Inserting into an Access 97 table using ODBC

 

 
Powered by phpBB® Forum Software