[unixODBC-support] Question regarding wide character support in Oracle ODBC driver

Hannum Daniel daniel.hannum at siemens.com
Mon Sep 27 19:22:01 BST 2004


I'm evaluating Easysoft's Oracle ODBC driver for a potential purchase. One
of our key requirements is the ability to read and write wide-character data
to and from a database. This is with NVARCHAR/NCHAR columns and Solaris
wchar_t buffers (which are UCS4, not UCS2 as they are on Windows)

Currently, the following bind call (the important part is the WCHAR macros)

sqlRc = SQLBindParameter(hstmt,
                         & strSessionKey_Ind); 

fails with "Error on SQLBindParameter, column id = 1 - ODBC Error
Information: SQL Error Information: SQL State = 07006, Native Error = 0, SQL
Message = [Easysoft][Oracle]Restricted data type attribute violation."

The error goes away if I use SQL_C_CHAR and SQL_CHAR instead of the wide
versions (but obviously, the data is incorrect). Do I need to issue some
kind of connection/statement parameter to enable wide-character support?

Thanks for your help

Daniel Hannum
Siemens Medical Solutions

This message and any included attachments are from Siemens Medical Solutions 
USA, Inc. and are intended only for the addressee(s).  
The information contained herein may include trade secrets or privileged or 
otherwise confidential information.  Unauthorized review, forwarding, printing, 
copying, distributing, or using such information is strictly prohibited and may 
be unlawful.  If you received this message in error, or have reason to believe 
you are not authorized to receive it, please promptly delete this message and 
notify the sender by e-mail with a copy to Central.SecurityOffice at shs.siemens.com 

Thank you

More information about the unixODBC-support mailing list