Wrox Home  
Search P2P Archive for: Go

  Return to Index  

activex_data_objects thread: Recordset won't update.


Message #1 by "Reed Mohn, Anders" <Anders.Reed.Mohn@i...> on Wed, 27 Jun 2001 16:15:53 +0200

I copied two code samples (openx and updatex) 

from the MDAC installation, and modified the

class definition for the recordbinding to fit my

DB.



Now, the original samples worked fine.

My modification works fine for reading, and 

does not give me any errors. However, calling Update(),

seems to have no effect. Changes are not reflected in the

database table.



Operating on the recordset directly works fine, but trying

to change values in the C++ object doesn't work.



Any ideas on what I've done wrong?



Below's a snippet of the code. So far, that's correct, isn't it?



Any tips appreciated.

Cheers,

Anders RM :)



...

...

    IADORecordBinding   *picRs  = NULL;  // Interface Pointer declared.

    CTransactionRs transactions;       // C++ Class object for recordset

...

...

        transactions.m_sze_transdate.day   = 4;

        transactions.m_sze_transdate.month = 6;

        transactions.m_sze_transdate.year  = 2001; 

        picRs->Update(&transactions);   //This seems to have no effect

...

...


  Return to Index