Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Binding OUTPUT parameters as UNICODE
I'm binding an OUTPUT parameter to a UNICODE string using the following syntax:
SQLBindParameter(hstmt, 1, SQL_PARAM_OUTPUT, SQL_C_TCHAR, SQL_VARCHAR, MAX_CHARS, 0, (SQLPOINTER) pData, MAX_CHARS*sizeof(TCHAR), &cbParm);
The intended behavior is to convert the varchar value to a string that can be used by the application. The application is designed to support both UNICODE and ANSI, hence the use of SQL_C_TCHAR. What it seems to return is a standard null-terminated string of single bytes (instead of the expected string of words).
The interesting thing about it is that my input parameters (bound as INPUT and SQL_C_TCHAR) apparently get converted OK. Is this a problem with the ODBC driver, SQL*Net, or the database?
ODBC driver version 2.05.03.01
Oracle client 7.3.4
Oracle Server 8.1.6.00
Will upgrading the client software to Version 8 help? Received on Mon Apr 30 2001 - 12:10:10 CDT