Skip to Content.
Sympa Menu

freetds - [freetds] major error with ct_bind

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Mark J. Lilback" <mark AT lilback.com>
  • To: freetds mailing list <freetds AT lists.ibiblio.org>
  • Subject: [freetds] major error with ct_bind
  • Date: Thu, 6 Mar 2003 22:43:34 -0500

I'm seeing a pretty major error with ct_bind and I wanted to see if anyone knows why this has slipped by.

According to the ctlib reference manual, when calling ct_bind, the datafmt.maxlength is ignored for fixed-length types. We are not doing this. Instead, we're returning a CS_FAIL when trying to convert the data to the bound type. That's causing most of my Sybase code to not work with FreeTDS.

The problems I'm seeing are:

1) there is no function to determine if a data type is a fixed-length type

2) we are using the src_len for the size to copy if it is not larger than the destlen.

3) this seems like a lot of work to fix

Am I wrong about (1)? If so, I'll make one, but based on the number of items that can very based on if something is fixed length or not (in ctlib and at the tds level), I'm really surprised I'm not finding such a function.

I'm also planning on fixing ct_command so that if you called previously with the CS_MORE option, the new query string is appended and doesn't replace the former query string. That seems like another big hole.

--
__________________________________________________________________________
"They that can give up essential liberty
Mark J. Lilback to obtain a little temporary safety
<mark AT lilback.com> deserve neither liberty or safety."
http://www.lilback.com/ -- Benjamin Franklin




Archive powered by MHonArc 2.6.24.

Top of Page