I have some questions about using a CommandPtr to execute an SQL statement
in an Access 97 database.
The SQL statement is:
"INSERT INTO APPLICATION
I have a correct database with the table and the table have all columns.
I create a CommandPtr using a active connection:
pCommand = NULL;
pCommand->CommandText = _bstr_t(strCommandText); //.AllocSysString();
pCommand->CommandType = adCmdText;
pCommand->ActiveConnection = pAdoDatabase->GetActiveConnection();
I then call Execute()
pCommand->Execute(&vRecords, NULL, adCmdText);
I then get an Exception saying: "Syntax error in INSERT INTO statement"
If I copy the SQL statement and creates a Query and then run the query then
1:st Question: Can anyone figure out why I get the error message?
2:nd Question: Do I need to set the third param in the Execute() when I
already have set pCommand->CommandType??