1 Reply Latest reply on Dec 12, 2012 2:40 PM by 979435

    Call to SQLExecDirectW fails with Oracle

      Hello Gentlemen

      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).

      With Oracle:

      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.

      Any ideas gentlemen?

      All the best,