SQL_C_BINARY data type fails in ODBC

From: <mike_jay_at_my-deja.com>
Date: Fri, 14 Apr 2000 03:09:41 GMT
Message-ID: <8d625a$27j$1_at_nnrp1.deja.com>



When binding a column to the SQL_C_BINARY data type within the Oracle 8.00.58.00 ODBC Driver, the value fails to return valid contents from a column of type CHAR(n) of the same length.

The Oracle 8.0.5.0 client has the 8.0.5.1 patch (i.e., NET8051) and the latest driver (i.e., ora8058) available from the Metalink support site.

The client computer is a Windows NT 4.0 with SP6 with the HP-UX 8.0.6.0 Oracle version DBMS.

If the column is bound to SQL_C_CHAR, the null terminator fills what should be the last character of valid data, but it is otherwise valid.

The column is a CHAR(28) within each relevant table in the Oracle database. The c data structure is a char array of size 28 (e.g., char myArray[28]) used to contain the data within the c program. Changing the data structure is not a feasible option.

Testing against the MS ODBC for Oracle 2.573.4202.00 ODBC Driver shows the series of calls I am using works, however, I need the Oracle ODBC driver's capability to support perserve cursor connection options.

The MS ODBC test program can be used to reproduce this failureas follows: 1) execute direct a SQL statement with one column of type CHAR (n), 2) bind the column to SQL_C_BINARY, 3) do a fetch, and 4) get the data.

Thanks,
Mike

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Apr 14 2000 - 05:09:41 CEST

Original text of this message