Re: HY003 error
"Tony Khalil" <[email protected]>
| Newsgroups | gmane.comp.db.unixodbc.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Nick,
Thank you for your reply. You are right with what you said, in the trace
file I have the following:
[ODBC][25164][SQLBindCol.c][222]
Entry:
Statement = 0x83c13d0
Column Number = 1
Target Type = 12 SQL_VARCHAR
Target Value = 0x83c1350
Buffer Length = 50
StrLen Or Ind = (nil)
[ODBC][25164][SQLBindCol.c][282]Error: HY003
The field type in the database is a varchar. How can I make the correct
binding.
Thank you in advance.
Regards,
Tony Khalil
===============
logo-intl
Beirut Office:
Yahchouchi Bldg.
Charles Malek Street Achrafieh
Beirut Lebanon
Tel: 961 1 213 027
Mob: 961 70839 646
Fax: 961 1 201 832
Paris office:
PRONERGY
5 rue Ampère
91380 CHILLY MAZARIN
Tel. +33 1 69194303
Fax. +33 1 69194301
Dubai Office:
Jebel Ali Free Zone
PO Box: 261 840
LOB 16-236
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
[email protected]
Sent: Thursday, October 23, 2008 2:00 PM
To: [email protected]
Subject: unixODBC-dev Digest, Vol 46, Issue 3
Send unixODBC-dev mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of unixODBC-dev digest..."
Today's Topics:
1. HY003 error (Tony Khalil)
2. Re: HY003 error (Nick Gorham)
----------------------------------------------------------------------
Message: 1
Date: Thu, 23 Oct 2008 12:06:08 +0300
From: "Tony Khalil" <[email protected]>
Subject: [unixODBC-dev] HY003 error
To: <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
Hi there,
I am using unixODBC with easysoft ODBC Driver for Linux. I downloaded odbcpp
library in order to use it as an intermediate level between ODBC and MSSQL
server. When trying to fetch data from the DB I get the following error:
[state HY003][unixODBC][Driver Manager]: Invalid Application Buffer Type.
This error does not occur if all the fields of the table accessed are of
type ?int?.
Do you have an idea what causes such an error and how could it be solved?
Regards,
Tony Khalil
===============
logo-intl
Beirut Office:
Yahchouchi Bldg.
Charles Malek Street ? Achrafieh
Beirut ? Lebanon
Tel: 961 1 213 027
Mob: 961 70839 646
Fax: 961 1 201 832
Paris office:
PRONERGY
5 rue Amp?re
91380 CHILLY MAZARIN
Tel. +33 1 69194303
Fax. +33 1 69194301
Dubai Office:
Jebel Ali Free Zone
PO Box: 261 840
LOB 16-236
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mailman.unixodbc.org/pipermail/unixodbc-dev/attachments/20081023/220
0ff56/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 3450 bytes
Desc: not available
URL:
<http://mailman.unixodbc.org/pipermail/unixodbc-dev/attachments/20081023/220
0ff56/attachment-0001.jpe>
------------------------------
Message: 2
Date: Thu, 23 Oct 2008 10:15:02 +0100
From: Nick Gorham <[email protected]>
Subject: Re: [unixODBC-dev] HY003 error
To: Development issues and topics for unixODBC
<[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed
Tony Khalil wrote:
>Hi there,
>
>
>
>I am using unixODBC with easysoft ODBC Driver for Linux. I downloaded
odbcpp
>library in order to use it as an intermediate level between ODBC and MSSQL
>server. When trying to fetch data from the DB I get the following error:
>
>[state HY003][unixODBC][Driver Manager]: Invalid Application Buffer Type.
>
> This error does not occur if all the fields of the table accessed are of
>type ?int?.
>
>
>
>Do you have an idea what causes such an error and how could it be solved?
>
>
>
I would expect its the functio that checks the buffer type that has
signaled a invalid type
check_target_type( target_type )
That checks that the SQL Type is one of the folowing:
switch( c_type ) {
case SQL_C_CHAR:
case SQL_C_LONG:
case SQL_C_SHORT:
case SQL_C_FLOAT:
case SQL_C_NUMERIC:
case SQL_C_DEFAULT:
case SQL_C_DATE:
case SQL_C_TIME:
case SQL_C_TIMESTAMP:
case SQL_C_TYPE_DATE:
case SQL_C_TYPE_TIME:
case SQL_C_TYPE_TIMESTAMP:
case SQL_C_INTERVAL_YEAR:
case SQL_C_INTERVAL_MONTH:
case SQL_C_INTERVAL_DAY:
case SQL_C_INTERVAL_HOUR:
case SQL_C_INTERVAL_MINUTE:
case SQL_C_INTERVAL_SECOND:
case SQL_C_INTERVAL_YEAR_TO_MONTH:
case SQL_C_INTERVAL_DAY_TO_HOUR:
case SQL_C_INTERVAL_DAY_TO_MINUTE:
case SQL_C_INTERVAL_DAY_TO_SECOND:
case SQL_C_INTERVAL_HOUR_TO_MINUTE:
case SQL_C_INTERVAL_HOUR_TO_SECOND:
case SQL_C_INTERVAL_MINUTE_TO_SECOND:
case SQL_C_BINARY:
case SQL_C_BIT:
case SQL_C_SBIGINT:
case SQL_C_UBIGINT:
case SQL_C_TINYINT:
case SQL_C_SLONG:
case SQL_C_SSHORT:
case SQL_C_STINYINT:
case SQL_C_ULONG:
case SQL_C_USHORT:
case SQL_C_UTINYINT:
case SQL_C_GUID:
case SQL_C_WCHAR:
case SQL_ARD_TYPE:
case SQL_C_DOUBLE:
Turn on ODBC tracing and see what is being passed into the call to
SQLBindCol It may be a type I haven't seen.
--
Nick
------------------------------
_______________________________________________
unixODBC-dev mailing list
[email protected]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
End of unixODBC-dev Digest, Vol 46, Issue 3
*******************************************
_______________________________________________
unixODBC-dev mailing list
[email protected]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev