Hi all,

I am struggling with one of my system's modules which is I need to edit filed's value in the data source depending on some variables.

My problem is I stuck with Recordset type because I making the editting via SQL statment and the following which are I done so far:


CDatabase DBDecaying;


CString SqlRulesDecaying;

CString sDriver("MICROSOFT ACCESS DRIVER (*.mdb)");
CString sDsn;
CString ssDSN("ODBC;DRIVER={%s};DSN='';DBQ=%s");
CString sFile("c:\\DB\\db.mdb");

sDsn.Format(ssDSN, sDriver, sFile);

DBDecaying.Open(NULL,false,false,sDsn);

CRecordset RecSetRulesDecaying( &DBDecaying );

int X=2,Y=3;
double NewActiLevel = 0;



SqlRulesDecaying.Format(_T("update Rules set RActiLevel=%f where CNum=%d and RNum=%d"),NewActiLevel,X,Y);


RecSetRulesDecaying.Open(CRecordset::forwardOnly,SqlRulesDecaying,CRecordset::??????);



So what I should put insted of ???? I tried (Update,Can Update,..) but I had syntax errors.


So please any help will be appreciated.

Best regards.