Skip to Content.
Sympa Menu

freetds - Re: trailing null on strings

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Peppler <mpeppler AT peppler.org>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: trailing null on strings
  • Date: Thu, 19 Oct 2000 08:11:00 -0700 (PDT)


James Ponder writes:
> On Thu, Oct 19, 2000 at 08:02:49AM -0400, Brian Bruns wrote:
> > Here is the problem. The bindfmt is 66! which is totally not valid, it
>
> I made ct_bind print out the given format, and it was 66. So I added
> a printf before every ct_bind in DBD::Sybase and re-installed. It printed
> 0. It got the string 'hello' without a null terminator. I cried ;(
>
> Sigh sigh sigh. I think the scenario probably went...
>
> * I didn't have FreeTDS or DBD::Sybase. I installed 0.50 and 0.23. There
> was a bug in 0.50 which meant nulls were added.
> * I upgraded FreeTDS and somehow DBD::Sybase wasn't re-installed (although
> I remember re-installing it <shrug>). The bug was fixed in FreeTDS but
> now DBD::Sybase was passing the wrong value and so I still got null
> terminated strings.
> * I have now re-installed DBD::Sybase and don't get any nulls.

Does freetds support the CS_VER_STRING ct_config() property?
If it doesn't I'd suggest adding it - it's really usefull in a not so
stable environment to make sure that a particular client is linked
with the correct version of the library. DBD::Sybase will return this
information by checking the $dbh->{syb_oc_version} attribute. For
example:

kiruna (8:03AM):11 > perl -MDBI -e '$dbh = DBI->connect("dbi:Sybase:", "sa");
print "$dbh->{syb_oc_version}\n"'
Sybase Client-Library/12.0/P/SPARC/Solaris 2.5.1/1/OPT/Mon Oct 4 12:07:29
1999

Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler AT peppler.org -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: ase-linux-list AT isug.com




Archive powered by MHonArc 2.6.24.

Top of Page