Click here to Skip to main content
15,887,347 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: FIle handling. turbo c Pin
David Crow9-Oct-09 7:50
David Crow9-Oct-09 7:50 
AnswerRe: FIle handling. turbo c Pin
CPallini9-Oct-09 12:08
mveCPallini9-Oct-09 12:08 
GeneralRe: FIle handling. turbo c Pin
Tabang9-Oct-09 12:48
Tabang9-Oct-09 12:48 
GeneralRe: FIle handling. turbo c Pin
Tabang9-Oct-09 12:57
Tabang9-Oct-09 12:57 
QuestionHow can i convert a .doc file to .html Pin
SNArruda9-Oct-09 5:22
SNArruda9-Oct-09 5:22 
AnswerRe: How can i convert a .doc file to .html Pin
Code-o-mat9-Oct-09 6:37
Code-o-mat9-Oct-09 6:37 
AnswerRe: How can i convert a .doc file to .html Pin
David Crow9-Oct-09 7:28
David Crow9-Oct-09 7:28 
QuestionHow to update a field in an DB using MFC Pin
moh.hijjawi9-Oct-09 4:20
moh.hijjawi9-Oct-09 4:20 
Hi all,
I am new in MFC. Shucks | :-\

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::??????);

Regarding the first parameter I tried snapshot,dynaset and dynamic instead of forwardonly. nothing happens.

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.
AnswerRe: How to update a field in an DB using MFC Pin
David Crow9-Oct-09 4:48
David Crow9-Oct-09 4:48 
GeneralRe: How to update a field in an DB using MFC Pin
moh.hijjawi9-Oct-09 5:33
moh.hijjawi9-Oct-09 5:33 
QuestionRe: How to update a field in an DB using MFC Pin
David Crow9-Oct-09 5:38
David Crow9-Oct-09 5:38 
AnswerRe: How to update a field in an DB using MFC Pin
moh.hijjawi9-Oct-09 5:46
moh.hijjawi9-Oct-09 5:46 
QuestionSearching item in second column list control using find function Pin
Le@rner9-Oct-09 2:37
Le@rner9-Oct-09 2:37 
QuestionRe: Searching item in second column list control using find function Pin
David Crow9-Oct-09 3:37
David Crow9-Oct-09 3:37 
QuestionHow to remove C4389 Pin
KASR19-Oct-09 0:26
KASR19-Oct-09 0:26 
AnswerRe: How to remove C4389 Pin
sashoalm9-Oct-09 0:30
sashoalm9-Oct-09 0:30 
AnswerRe: How to remove C4389 Pin
transoft9-Oct-09 2:41
transoft9-Oct-09 2:41 
QuestionBG color for popup dialogs Pin
hellogany8-Oct-09 23:16
hellogany8-Oct-09 23:16 
AnswerRe: BG color for popup dialogs [modified] Pin
Hristo-Bojilov8-Oct-09 23:58
Hristo-Bojilov8-Oct-09 23:58 
AnswerRe: BG color for popup dialogs Pin
Anish C.V9-Oct-09 1:04
Anish C.V9-Oct-09 1:04 
Question[Message Deleted] Pin
Mogamboo_Khush_Hua8-Oct-09 22:51
Mogamboo_Khush_Hua8-Oct-09 22:51 
AnswerRe: problem in string searching Pin
minkowski8-Oct-09 22:56
minkowski8-Oct-09 22:56 
AnswerRe: problem in string searching Pin
Jijo.Raj8-Oct-09 23:10
Jijo.Raj8-Oct-09 23:10 
QuestionRe: problem in string searching Pin
CPallini8-Oct-09 23:50
mveCPallini8-Oct-09 23:50 
Questionquestion on using kdbg Pin
minkowski8-Oct-09 22:17
minkowski8-Oct-09 22:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.