[unixODBC-support] Regarding Unix ODBC SQLFetch issue

Nick Gorham nick at lurcher.org
Tue May 10 14:53:15 BST 2016


On 10/05/16 14:43, D Pamuleti wrote:
>
> Hi Nick,
>
> I have added those settings and got the Trace logs. I have attached 
> the trace logs for Error and Successful run of the query.
>
> Could you please check and let me know if I miss anything there.
>
> Thanks,
>
> DASARI
>

Not that I am here to debug your application code, but the log shows 
that the driver is reporting a column size of 30 *characters*

[ODBC][14156158][1462886822.146143][SQLDescribeCol.c][247]
         Entry:
             Statement = 11033f670
             Column Number = 1
             Column Name = fffffffffffe068
             Buffer Length = 128
             Name Length = fffffffffffddb8
             Data Type = fffffffffffddb6
             Column Size = fffffffffffddc0
             Decimal Digits = fffffffffffddb4
             Nullable = fffffffffffddb2
[ODBC][14156158][1462886822.147447][SQLDescribeCol.c][504]
         Exit:[SQL_SUCCESS]
             Column Name = [USER]
             Data Type = fffffffffffddb6 -> 12
             Column Size = fffffffffffddc0 -> 30
             Decimal Digits = fffffffffffddb4 -> 0
             Nullable = fffffffffffddb2 -> 1

Your application thens bind it to return a SQL_WCHAR (two byte per 
character) and gives a buffer length in *bytes* of 31.

[ODBC][14156158][1462886822.148699][SQLBindCol.c][236]
         Entry:
             Statement = 11033f670
             Column Number = 1
             Target Type = -8 SQL_WCHAR
             Target Value = 110376a10
             Buffer Length = 31
             StrLen Or Ind = 110363b70
[ODBC][14156158][1462886822.149756][SQLBindCol.c][344]
         Exit:[SQL_SUCCESS]

-- 
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20160510/d72084c8/attachment.html>


More information about the unixODBC-support mailing list