I am trying to extract data from an Oracle database through an ODBC connection using the standard ODBC functions. These work perfectly well for SQL Server. But with Oracle, SQLExecDirectW fails to execute a simple query (that works fine with SQL Server).
o Handle is allocated OK.
o It connects OK through the handle.
o The connection returns an expanded connection string. It returns the right version number.
So all is cool so far. But when I call SQLExecDirectW, the execution fails, but not on return status. Although the return status is success, the number of rows processed is 0. (With SQL Server, where it works, this number is 1.)
I have tried to get the SQL state by calling SQLGetDiagRec, but this is not set. (Probably because it SQLExecDirectW returned a success.)
I have tried replacing SQLExecDirectW with the more basic SQLExecDirect, and this also fails.