Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Oracle ODBC Driver and SQLGetData function
Hi all,
I'm encountering a strange problem and I can't seem to make any sense of. First, here is my environment :
Client.
WIN2k Pro - SP3
Two ODBC datasources, both to an Oracle Database Server (Oracle 9i) The datasources use the following ODBC drivers
Source 1 = 2.573.9001.00 (MS Driver) Source 2 = 8.01.78.00 (Oracle Driver)
Now here is my problem. In my program, I execute exactly the same code and
I get success in one case(Source 1 - MS Driver), and an ODBC error in the
other(Source 2 - Oracle Driver).
In the case that fails, the call thats failing is the SQLGetData call. In
the Source 1 case, the code goes thru fine and I have no problem. In
the Source 2 case, I get the following error from the SQLGetData call :
[S1109] [Oracle][ODBC][Ora]Invalid cursor position.
The table I'm querying has the following structure :
VI int, VC char(10), VV varchar(20), VF float, V2 int, V4 int, V9 int
and the only column I'm querying is the first one, VI.
Here is the output from the ODBC log file
Dyalog 56c-2e4 ENTER SQLExecDirect HSTMT 0B151978 UCHAR * 0x0A034E38 [ -3] "SELECT VI FROM NICK ORDER BY VI\ 0" SDWORD -3 Dyalog 56c-2e4 EXIT SQLExecDirect with return code 0
(SQL_SUCCESS)
HSTMT 0B151978 UCHAR * 0x0A034E38 [ -3] "SELECT VI FROM NICK ORDER BY VI\ 0" SDWORD -3 Dyalog 56c-2e4 ENTER SQLNumResultCols HSTMT 0B151978 SWORD * 0x0A032270 Dyalog 56c-2e4 EXIT SQLNumResultCols with return code 0
(SQL_SUCCESS)
HSTMT 0B151978 SWORD * 0x0A032270 (1) Dyalog 56c-2e4 ENTER SQLFetch HSTMT 0B151978 Dyalog 56c-2e4 EXIT SQLFetch with return code 0 (SQL_SUCCESS) HSTMT 0B151978 Dyalog 56c-2e4 ENTER SQLGetData HSTMT 0B151978 UWORD 1 SWORD 5 <SQL_C_SHORT> PTR <unknown type> SQLLEN 4 SQLLEN * 0x0006EC18 Dyalog 56c-2e4 EXIT SQLGetData with return code -1 (SQL_ERROR) HSTMT 0B151978 UWORD 1 SWORD 5 <SQL_C_SHORT> PTR <unknown type> SQLLEN 4 SQLLEN * 0x0006EC18
DIAG [S1109] [Oracle][ODBC][Ora]Invalid cursor position. (1)
Anybody have any clue as to whats going on here ?
Thanks in advance.
Nick
Received on Mon Dec 16 2002 - 16:00:44 CST