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

C / C++ / MFC

 
AnswerRe: Black and white color palette Pin
_AnsHUMAN_ 6-Jun-06 0:10
_AnsHUMAN_ 6-Jun-06 0:10 
GeneralRe: Black and white color palette Pin
cathy_d'souza6-Jun-06 0:29
cathy_d'souza6-Jun-06 0:29 
QuestionOCR Pin
Abhishek Joshi5-Jun-06 22:46
Abhishek Joshi5-Jun-06 22:46 
AnswerRe: OCR Pin
ThatsAlok6-Jun-06 0:46
ThatsAlok6-Jun-06 0:46 
QuestionStandard alternative to MAX_PATH? Pin
Lord Kixdemp5-Jun-06 22:41
Lord Kixdemp5-Jun-06 22:41 
AnswerRe: Standard alternative to MAX_PATH? Pin
Laxman Auti5-Jun-06 22:49
Laxman Auti5-Jun-06 22:49 
GeneralRe: Standard alternative to MAX_PATH? Pin
Lord Kixdemp6-Jun-06 14:25
Lord Kixdemp6-Jun-06 14:25 
QuestionHelp with ADO and vc++-newbie [modified] Pin
antonaras5-Jun-06 22:39
antonaras5-Jun-06 22:39 
Hi everyone i'm trying to update a record of a db in access using ADO and the SQL update command
the columns in the db are:
token - text
Spam - number
Ham - number
Pos - number (with decimal points)
app- number
in my program i have the following variables for each of the columns
_bstr_t token;
int valField2;
int valField3;
double valField4;
int valField5;

i try this code but i get an error at runtime

pCommand->ActiveConnection = m_pConn;
command="UPDATE tblDictionary SET Spam="+vlaField2;
command+=",Pos="+valField4;
command+=",app="+valField5;
command+="WHERE token='"+ token;
command+="'";

_bstr_t strSQLstatment=command.c_str();
variant_t vntRecordAffected;
m_pConn->Execute(strSQLstatment,&vntRecordAffected,adCmdText);

i get the following error Error:¦¨¨m¨V //i have no idea what this means but this is what i get


if i try to update with spacific numbers instead of using variables it works fine

pCommand->ActiveConnection = m_pConn;
command="UPDATE tblDictionary SET Spam=10,Pos=0.43,app=10 WHERE token='"+ token;
command+="'";

Any ideas what might be wrong.
Do i need to convert all variables that are to be inserted to type _bstr_t;
Please help me i really need to find this out thanks a lot


AnswerRe: Help with ADO and vc++-newbie [modified] Pin
2249175-Jun-06 23:08
2249175-Jun-06 23:08 
GeneralRe: Help with ADO and vc++-newbie [modified] Pin
antonaras5-Jun-06 23:15
antonaras5-Jun-06 23:15 
GeneralRe: Help with ADO and vc++-newbie [modified] Pin
2249175-Jun-06 23:26
2249175-Jun-06 23:26 
GeneralRe: Help with ADO and vc++-newbie [modified] Pin
antonaras5-Jun-06 23:46
antonaras5-Jun-06 23:46 
GeneralRe: Help with ADO and vc++-newbie [modified] Pin
2249176-Jun-06 0:11
2249176-Jun-06 0:11 
GeneralRe: Help with ADO and vc++-newbie [modified] Pin
antonaras6-Jun-06 0:23
antonaras6-Jun-06 0:23 
AnswerRe: Help with ADO and vc++-newbie [modified] Pin
Viorel.5-Jun-06 23:37
Viorel.5-Jun-06 23:37 
GeneralRe: Help with ADO and vc++-newbie [modified] Pin
antonaras5-Jun-06 23:49
antonaras5-Jun-06 23:49 
QuestionRe: Help with ADO and vc++-newbie [modified] Pin
David Crow6-Jun-06 3:46
David Crow6-Jun-06 3:46 
Questiondialog box Pin
p_5-Jun-06 22:34
p_5-Jun-06 22:34 
AnswerRe: dialog box Pin
David Crow6-Jun-06 3:51
David Crow6-Jun-06 3:51 
QuestionInitHashTable()?? Pin
bosfan5-Jun-06 22:28
bosfan5-Jun-06 22:28 
AnswerRe: InitHashTable()?? Pin
Viorel.5-Jun-06 22:50
Viorel.5-Jun-06 22:50 
QuestionVery big problem! Pin
bosfan5-Jun-06 22:15
bosfan5-Jun-06 22:15 
AnswerRe: Very big problem! Pin
David Crow6-Jun-06 4:04
David Crow6-Jun-06 4:04 
QuestionUrgent plz! Imag transform on VC7 + result - one exe file (without libs and dlls) Pin
Diplom@t5-Jun-06 22:11
Diplom@t5-Jun-06 22:11 
QuestionRe: Urgent plz! Imag transform on VC7 + result - one exe file (without libs and dlls) Pin
Hamid_RT5-Jun-06 22:24
Hamid_RT5-Jun-06 22:24 

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.