[unixODBC-dev] HY003 error

Tony Khalil tkhalil at stintl.net
Thu Oct 23 12:15:35 BST 2008


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: unixodbc-dev-bounces at mailman.unixodbc.org
[mailto:unixodbc-dev-bounces at mailman.unixodbc.org] On Behalf Of
unixodbc-dev-request at mailman.unixodbc.org
Sent: Thursday, October 23, 2008 2:00 PM
To: unixodbc-dev at mailman.unixodbc.org
Subject: unixODBC-dev Digest, Vol 46, Issue 3

Send unixODBC-dev mailing list submissions to
	unixodbc-dev at mailman.unixodbc.org

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
	unixodbc-dev-request at mailman.unixodbc.org

You can reach the person managing the list at
	unixodbc-dev-owner at mailman.unixodbc.org

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" <tkhalil at stintl.net>
Subject: [unixODBC-dev] HY003 error
To: <unixodbc-dev at mailman.unixodbc.org>
Message-ID: <49003e7f.050cc00a.7d69.7b2f at mx.google.com>
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 <nick at lurcher.org>
Subject: Re: [unixODBC-dev] HY003 error
To: Development issues and topics for unixODBC
	<unixodbc-dev at mailman.unixodbc.org>
Message-ID: <49004096.6010607 at lurcher.org>
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
unixODBC-dev at mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev


End of unixODBC-dev Digest, Vol 46, Issue 3
*******************************************



More information about the unixODBC-dev mailing list