SQLBindStatment HY090 Issue

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

SQLBindStatment HY090 Issue

Paul Carmichael
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:

[ODBC][746][1410797326.312134][SQLAllocHandle.c][529]
                Entry:
                        Handle Type = 3
                        Input Handle = 0x68d0d0
[ODBC][746][1410797326.312198][SQLAllocHandle.c][1064]
                Exit:[SQL_SUCCESS]
                        Output Handle = 0x81ec50

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

[ODBC][746][1410797420.114084][SQLBindParameter.c][213]
                Entry:
                        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,

[ODBC][746][1410797420.114442][SQLError.c][348]
                Entry:
                        Statement = 0x81ec50
                        SQLState = 0x81e930
                        Native = 0x81e938
                        Message Text = 0x81e93c
                        Buffer Length = 512
                        Text Len Ptr = 0x7fffffff859e
[ODBC][746][1410797420.114495][SQLError.c][385]
                Exit:[SQL_SUCCESS]
                        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 when,

"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?

Thanks,

Paul



_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|

Re: SQLBindStatment HY090 Issue

Nick Gorham-2
On 15/09/14 17:51, Paul Carmichael wrote:

> 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:
>
> [ODBC][746][1410797326.312134][SQLAllocHandle.c][529]
>                 Entry:
>                         Handle Type = 3
>                         Input Handle = 0x68d0d0
> [ODBC][746][1410797326.312198][SQLAllocHandle.c][1064]
>                 Exit:[SQL_SUCCESS]
>                         Output Handle = 0x81ec50
>
> And after the allocation I try to bind an integer as follows,

What version of the driver manager are you using?

It may be fixed in 2.3.2 (3pre)

--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|

Re: SQLBindStatment HY090 Issue

Paul Carmichael
Hi Nick,

Thanks for your speedy reply.

root@fenton:/usr/lib64 } odbcinst --version
unixODBC 2.2.14

I can update to the latest version and try again, do you think this could be a known issue you've seen in the past?

Thanks,

Paul


On 15 September 2014 17:54, Nick Gorham <[hidden email]> wrote:
On 15/09/14 17:51, Paul Carmichael wrote:
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:

[ODBC][746][1410797326.312134][SQLAllocHandle.c][529]
                Entry:
                        Handle Type = 3
                        Input Handle = 0x68d0d0
[ODBC][746][1410797326.312198][SQLAllocHandle.c][1064]
                Exit:[SQL_SUCCESS]
                        Output Handle = 0x81ec50

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

What version of the driver manager are you using?

It may be fixed in 2.3.2 (3pre)

--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support


_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|

Re: SQLBindStatment HY090 Issue

Nick Gorham-2
On 15/09/14 18:26, Paul Carmichael wrote:
> Hi Nick,
>
> Thanks for your speedy reply.
>
> root@fenton:/usr/lib64 } odbcinst --version
> unixODBC 2.2.14
>
> I can update to the latest version and try again, do you think this
> could be a known issue you've seen in the past?

Most possible. Looking at the DM code now it certainly should not do it.

--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support