Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle 9i via C++

Status
Not open for further replies.

mbames

Programmer
Jun 5, 2003
29
GB
I am trying to a write a little application that read / write data from 9i.

I have some C++ code that works with Access and SQL Server via ODBC. However when I try and run it on 9i, it then gets upset, giving me the following error:
Code:
ORA-00900: invalid SQL statement

although I can quite happily run the statement in SQL*Plus. The statement is as follows:
Code:
UPDATE tblRegCode SET rDescription = 'moretime in bed' WHERE rCode = '/'"

This was done using the Oracle in OraHome92 ODBC driver. If I try and use the MS Oracle driver (Microsoft ODBC for Oracle) then I failed to even connect to the database.

Any ideas what I can do? The strangest thing is that the change is applied to the database and then the above error is issued.

Thanks,
Matt
 
I double quote at the and just a typo or a part of statement?

Regards, Dima
 
The double quote was a typo - I copied the line from my c++ code:
Code:
_bstr_t strSQLChange("UPDATE tblRegCode SET rDescription = 'moretime in bed' WHERE rCode = '/'");

and

Code:
_bstr_t strSQLRestore("UPDATE tblRegCode SET rDescription = 'Morning' WHERE rCode = '/'");
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top