Skip to Content.
Sympa Menu

freetds - Re: [freetds] dbbind failure on unknown bindtype

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] dbbind failure on unknown bindtype
  • Date: Wed, 29 Dec 2010 01:10:47 -0500

Paul Thurston wrote:
> The standard call to dbbind (...) fails on the current build.
>
> Stepping thru the code, the issue is on line 2085 of dblib.c
>
> Reading an integer from SQL Server 2007, the function call
> _db_get_server_type(int bindtype) is unable to map type code = 56.
>
> Is there a patch for this?

I'm not sure I understand what you think the problem is. What arguments
are you passing to dbbind(), and what is the datatype of the column you're
binding?

_db_get_server_type() takes a bindtype parameter, a value between 0 and
19. 56 is not a choice. Cf. lines 448-466 in sybdb .h.

If you pass an invalid bindtype argument (a/k/a vartype in Sybase's
documentation) to dbbind() it should fail with SYBEBTYP. If the column
datatype cannot be converted to the host variable type -- i.e. cannot be
bound -- it should fail with SYBEABMT.

If you meant SQL Server 2008, perhaps there's a new datatype that
dbwillconvert needs to cope with.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page