Forum Stats

  • 3,781,282 Users
  • 2,254,499 Discussions
  • 7,879,632 Comments

Discussions

ODBC Unicode

3004
3004 Member Posts: 204,171
An ODBC group, super!
I have a little unicode mystery...
I can get unicode characters happily from a normal statement (e.g. select * from) but not from a ref cursor in a stored procedure when using ODBC. (my stored procedures are within packages)
My system is using Ora816 with patches to 8.1.6.1.2 and with ODBC 8.1.6.1 and OraOLEDB 8.1.6.2.
I know all the client and db etc are setup ok for unicode since it works fine when my application uses OLEDB, and not when using ODBC. Of course the problem could be in Microsofts OLEDB for ODBC since my application uses ADO.
Any ideas or fixes appreciated.

Regards

Jason.

Comments

  • 3004
    3004 Member Posts: 204,171
    The ODBC driver will return the columns as Unicode only if the column is bound as SQL_C_WCHAR.

    The problem may be that Ole/DB is calling SQLDescribeCol to get the characteristics of the column to decide how to bind the column. The Oracle driver will never respond saying the column is Unicode because columns in the database can not be tagged as Unicode. So the column ends up being bound as SQL_C_CHAR. The next release of the Oracle ODBC driver is going to have a work around option to force the driver to always indicate character columns are Unicode when a SQLDescribeCol is issued.
  • 3004
    3004 Member Posts: 204,171
    Thanks - that makes sense.

    Anyone got a rough idea when the next version is due? (days/weeks/months is close enough since I realise you may not want to release a date as such at this stage)

    thanks

    Jason.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by mgianata ():
    The ODBC driver will return the columns as Unicode only if the column is bound as SQL_C_WCHAR.

    The problem may be that Ole/DB is calling SQLDescribeCol to get the characteristics of the column to decide how to bind the column. The Oracle driver will never respond saying the column is Unicode because columns in the database can not be tagged as Unicode. So the column ends up being bound as SQL_C_CHAR. The next release of the Oracle ODBC driver is going to have a work around option to force the driver to always indicate character columns are Unicode when a SQLDescribeCol is issued.
    <HR></BLOCKQUOTE>

    null
  • 3004
    3004 Member Posts: 204,171
    Rough expectation is 1-2 months. Hopefully closer to 1 than 2, but we're not sure about that yet.

    Justin Cave
    ODBC Development
This discussion has been closed.