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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing an Oracle database with visual c++

Status
Not open for further replies.

StefanoCarniel

Programmer
Apr 29, 2005
15
IT
Hello everybody, I need to retrieve data from a database Oracle in a MFC application. I connect successfully to the database and set the sql command, but when I try to open the recordset I get the error "Invalid character" from Oracle. I don't know exactly if this is the right place to post this question. If not, please tell me which is the right one (if there is). I post the code:

conn.CreateInstance (__uuidof(Connection));
connessione->Open(<path to db>, <user>, <password>, adModeUnknown )

command.CreateInstance (__uuidof (Command));
command->ActiveConnection = conn;
command->CommandText ="SELECT * FROM myTable;";

table.CreateInstance (__uuidof (Recordset));
table->Open ((IDispatch *) command, vtMissing, adOpenStatic, adLockBatchOptimistic, adCmdUnknown);

...and here I get the error
Can you help me?
Thank you

Stefano
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top