This content has been marked as final. Show 2 replies
The 11g XE home should already come with ODBC and ODP.NET; there should be no need to add another home.
The exception to that would be if you wanted to use Oracle Developer Tools for Visual Studio plugin for Server Explorer, in which case you'd need to go ahead and add a ODTwithODAC112030 install into a separate home. After doing that, you'd need to setup tnsnames.ora in that new home so the client can find the XE database.
Hope it helps,
Thanks, I have the ODBC connection working, in the sense of being able to test the connection via SQL> connect system/password
but, I need to run SQL commands from a C++ program against the Oracle 11 XE database, so what i need is C++ code examples along the following lines:
1. Include the Header Files
# include statements at the beginning of your programs:
2. Open a Connection to a Database
Set the environment handle:
SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &hdlEnv);
Set ODBC Driver version:
Set the connection handle:
SQLAllocHandle(SQL_HANDLE_DBC, hdlEnv, &hdlConn);
Connect to the database:
SQLConnect(hdlConn, (SQLCHAR*)dsnName,SQL_NTS,(SQLCHAR*)userID,SQL_NTS, (SQLCHAR*)passwd, SQL_NTS);
Plus an example of assembling the SQL command for dispatch to Oracle via ODBC and accessing the reply (if any)
I have looked in the documentation but have found nothing ...
So i would appreciate being pointed in the right dirrection.