VARCHAR2 to SQL Datatype Conversions

The ODBC and JDBC applications will use ANSI type VARCHAR or CHAR as SQL datatype to bind and retrieve VARCHAR2 values.

The possible conversion from C datatype to SQL datatype and vice versa are listed in the following table:

C Datatype SQL Datatype

SQL_C_CHAR

SQL_CHAR

SQL_VARCHAR

SQL_LONG_VARCHAR

SQL_ DECIMAL

SQL_ NUMERIC

The possible conversions in Windows UNICODE driver are listed in the following table:
C Datatype SQL Datatype
SQL_C_CHAR or SQL_C_WCHAR

SQL_WCHAR

SQL_WVARCHAR

SQL_WLONG_VARCHAR