This discussion is archived
1 Reply Latest reply: Dec 12, 2012 6:40 AM by 979435 RSS

Call to SQLExecDirectW fails with Oracle

979435 Newbie
Currently Being Moderated
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,
Lew.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points