|
-
June 11th, 2009, 07:31 AM
#1
SQL statement with MFC
Good Day All,
Really I tried to retrieve data from my Access DB but I struggle with the syntax when I need to attach an variables with the SELECT statement like the following :
CString X("2");
CString SQL1;
SQL= "SELECT Col1 from Table where Col2="+X; // its works fine no problems although that its declared as CString and Col2 is integer in the DB
but my struggling when I want to attach 2 variables I tried many times and I have different types of errors somtimes from the compiler and sometimes from the ACCESS "there is missing in your expression"
Please any one can help me and I really appreciate that
Hijjawi
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|