OLEDB w/ WriteCache ??????? 
Author Message
 OLEDB w/ WriteCache ???????

I'm writing an VC++ OLEDB app with using the VC++ template class like
CCommand<CAccessor<CMyPrivateData> >.
Now I'm updating/adding records with CMyPrivateDataSet class and it seems to
be ok.

BUT: Now I'm updating/inserting a record and close the recordset
CMyPrivateDataSet immediately. Than than I'm opening a second recordset
defined like CCommand<CAccessor<CMyPrivateViewData> > and reading the the
records. But I'm receiving the old (!!) and not updated and changed before
(!!) records from the database. If I'm waiting and reading the records
again, I get the right data.
It seems that the first time I'm reading the records the data are not
written in the database. Only if I'm waiting some seconds (i.e. with a
breakpoint) everything is going well and I recieve the right data at the
first try.
* Is there a cache and/or write cache what could be the problem?
* Or what could be wrong?
* How can I avoid this problem? Is the a function available to write
  all changes to the database file (something like Flush(),..)?


PS: Here is the code I'm using for update the record.

    CWorkRecordsSet* pSet = &GetDocument()->m_WorkRecordsSet;
    HRESULT hr = pSet->Open();
    if (hr != S_OK){
        return -1;
    HRESULT hr = pSet->MoveFirst();
    if( hr == S_OK ){
        // Update my set members
        if( FAILED(pSet->SetData()) ){
            // ... Error handling

PGP Fingerprints:
Roland J. Graf = 0592 DA69 440A E137 4ED5  22AA 3D05 CF60 FABD E14E

Fri, 07 Mar 2003 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. OLEDB interfaces vs OLEDB templates

2. ADO vs OLEDB COM vs OLEDB ATL templates

3. OLEDB Parameterised Query (beginner OLEDB)

4. Help !!! OleDb and Transactions

5. oledb insert command

6. OLEDB Provider ATL from VS6 -> dotnet

7. OLEDB Provider

8. OleDb Attributes?

9. ATL OLEDB Consumer using attributes

10. ATL, MFC, OLEDB... vc7

11. ATL7 oledb consumer guru needed urgently

12. OLEDB - How to fill ID_EDIT with data from RecordSet


Powered by phpBB® Forum Software