Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unicode applications and Driver Manager with a non-Unicode driver

0 views
Skip to first unread message

Larry Johnson

unread,
Sep 3, 2009, 12:56:08 PM9/3/09
to
So, I have an non-Unicode enabled driver and I want to retrieve result sets from it.  What I can not tell from the documentation is what happens with SQLDescribeColW as far as the length field for strings.  Is the length reported here the database length in bytes or the number of bytes when converted to Unicode? Bear in mind that it could be possible the driver is returning DBCS in some cases, and I'm not even sure if there's a way to identify that, is there?

Pak-Ming Cheung - MSFT

unread,
Sep 3, 2009, 11:21:01 PM9/3/09
to
I believe you are talking about the arugment: ColumnSizePtr of the API
SQLDescribeCol.

I think that the MSDN pages:
http://msdn.microsoft.com/en-us/library/ms716289(VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms711786(VS.85).aspx
are relatively clear.

No matter whether your driver is ANSI / UNICODE, the function SQLDescribeCol
or SQLDescribeColW should return the size of the column *on the data source*.
Therefore, there is nothing related to the client side (your driver or your
binding information).

btw, as in the second link, if the data source is using UNICODE datatype, it
should return the number of characters instead of number of bytes on the
server.

Thanks,
Ming.
P.S. We recommend customers to use the forum to ask questions in the future,
where you can obtain a faster response (Forum is at:
http://social.msdn.microsoft.com/forums/en-US/sqldataaccess/threads/)

0 new messages