Skip to Content.
Sympa Menu

freetds - Re: Boolean data problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Boolean data problem
  • Date: Fri, 18 May 2001 21:17:38 -0400 (EDT)


Hi Tom,

I've checked in some changes for bitn support (nullable bit type). Funny
thing is my version of enterprise sql manager doesn't allow you to create
nullable bit types...SQL does however.

Anywho, give it a shot and let me know if it works. I did some simple
testing with SQSH, but I'll assume php/perl/whatever will work as well.

(detailed explaination)
MS introduced a new datatype bitn with sql 7 that corresponds to the
existing bit type. I had added some support to FreeTDS that was forwarded
on to me, but for some reason I had BITN listed as a fixed length datatype
(it's not, its length is either 1 or 0). In addition, ctlib needed to be
able to convert it back and forth to CS_BIT_TYPE.

Cheers,

Brian

On Tue, 15 May 2001, Tom Moore wrote:

> Hi I am trying to read a boolean data field from a MS SQLServer 2000
> database.
>
> I am using the current FreeTDS 'snapshot' source code that has
> modifications as recent as 8/4/2001.
>
> If I include a boolean field in a query I get numerous errors on stderr
> that look similar to "Unknown marker: 0!!", where the numeric value varies
> between 0, 10, 78, 101, 105 etc.
>
> If I use the trick suggested previously "cast(BoolField as int) BoolField"
> the query works fine.
>
> I created a tdsdump file, and the first are attached at the bottom.
>
> I am willing to help debug and fix this problem, but I don't know where to
> start and I'll need lots of pointers.
>
> Regards,
>
> Tom





Archive powered by MHonArc 2.6.24.

Top of Page