Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Fetching LONG types in ODBC without binding (i.e. using SQLGetData)

Fetching LONG types in ODBC without binding (i.e. using SQLGetData)

From: Tom Hynes <tomh_at_inter-intelli.com>
Date: Mon, 2 Aug 1999 11:16:42 -0500
Message-ID: <kvjp3.131$e4.215@news1.iquest.net>


Greetings,

I'm experiencing a problem with the ODBC driver that ships with Oracle (the Microsoft ODBC driver does not experience this problem). The problem is an ORA-03130 error ("the buffer for the next piece to be fetched is required") on a call to SQLFetch.

I've been using ODBC for several years against multiple RDBMSs and ODBC drivers, and the ODBC call sequence is pretty much boilerplate stuff that has always worked before:

  1. SQLAllocHandle (for SQL_HANDLE_ENV)
  2. SQLSetEnvAttr (for SQL_ATTR_ODBC_VERSION set to 3)
  3. SQLAllocHandle (for SQL_HANDLE_DBC)
  4. SQLConnectW
  5. SQLAllocHandle (for SQL_HANDLE_STMT)
  6. SQLExecDirectW (stmt is 'SELECT t FROM Test WHERE i = 1'; t is an Oracle LONG type)
  7. SQLNumResultCols (succeeds with 1 as the number of cols)
  8. SQLFetch (fails with SQL_ERROR; subsequent SQLGetDiagRecW call returns ORA-03130 as the native error)

I should mention that the Oracle ODBC Test program works with this query; I examined the ODBC log file and it is using SQLBindCol (with length 21) instead of SQLGetData. Unfortunately, for various reasons this will not be a workaround that I can pursue in the immediate future.

Has anyone encountered this situation before, or have any ideas as to what the problem may be?

(BTW, the diver version is 8.00.03.00)

Thanks in advance,

Tom Hynes
Software Engineer
Interactive Intelligence, Inc.
tomh_at_inter-intelli.com Received on Mon Aug 02 1999 - 11:16:42 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US