[unixODBC-support] SQLBindStatment HY090 Issue

Paul Carmichael paulcarmo at gmail.com
Mon Sep 15 17:51:40 BST 2014

Good Evening All,

I hope someone can offer some insight into the issue I'm having when
binding an integer to a statement I've been allocated.

I've included ODBC traces, I hope this is sufficient. I can provide more
information if anyone can see a clue below.

Here is where I've successfully been allocated a handle:

                        Handle Type = 3
                        Input Handle = 0x68d0d0
                        Output Handle = 0x81ec50

And after the allocation I try to bind an integer as follows,

                        Statement = 0x81ec50
                        Param Number = 1
                        Param Type = 1
                        C Type = 4 SQL_C_LONG
                        SQL Type = 4 SQL_INTEGER
                        Col Def = 0
                        Scale = 0
                        Rgb Value = 0x7dff10
                        Value Max = 0
                        StrLen Or Ind = 0x7dff14
[ODBC][746][1410797420.114213][SQLBindParameter.c][240]Error: HY090

This encounters an error and a verbose explanation is retrieved here,

                        Statement = 0x81ec50
                        SQLState = 0x81e930
                        Native = 0x81e938
                        Message Text = 0x81e93c
                        Buffer Length = 512
                        Text Len Ptr = 0x7fffffff859e
                        SQLState = HY090
                        Native = 0x81e938 -> 0
                        Message Text = [[unixODBC][Driver Manager]Invalid
string or buffer length]

>From documentation I can say that the HY090 error should be encountered

"The value specified for the argument BufferLength is less than 0"

Although for my call to SQLBindParameter I specifiy 0. And also I don't
think the parameter should be checked as,

"For non-character and non-binary data, this argument is ignored and the
length of the ParameterValuePtr buffer is assumed to be the length
associated with the C data type."

Can anyone spot what I'm doing wrong?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20140915/98e7c3be/attachment.html>

More information about the unixODBC-support mailing list