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