Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Oracle ODBC / UNICODE Non Conformance
Hi all - I have come across what appears to be different behaviour between the Oracle ODBC drivers and the MS ODBC drivers for MS SQL and Acccess.
We now bind all input parameter and output column character data with SQL_C_WCHAR since we handle all char data as double byte.
With SQL Server if the underlying column is CHAR (not NCHAR) the ODBC driver (or manager?) converts the data to single byte (since CHAR is single byte characters) and stores the data correctly. When reading the data back ODBC converts the data back to double byte and everything works correctly.
Same with Access although Access has only one char type which I assume is alwasy double byte. IE it has no CHAR/NCHAR distinction.
According to the ODBC doc the above behaviour is correct and managed automatically by ODBC (Driver + manager)
Now with Oracle none of this works. If the underlying column is char we get every 2nd byte 0 and loose half the remaining string.
When reading the data back the same problem.
If the underlying column is NCHAR then we just get the error 'character set mismatch' after SQLExecute.
If anyone has any insight into these issues I would appreciate it..
David Murphy
DavidMurphy_at_j-netdirect.com
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Oct 09 2000 - 14:26:11 CDT