Thread: odbc and bit-field

odbc and bit-field

From
Jussi Jaaskelainen
Date:
Hi!
Is this bug or is this "bug"...
I have table with field type 'bit'  acting as "boolean (true/false)" but
thru ODBC driver (in Win-NT 4) it's reported to be "VARCHAR [254]", so
it cannot be set to True or False (or 1 or 0)

Problem araised when I tried to move data from MSSQL 7 server to
Postgresql table using datatransform-services and odbc-drivers

Postgresql server is Linux 7.0.3 at SuSE 7.0
Odbc-driver is 7.01.00.06  date 06/03/01

--
Jussi Jääskeläinen        Email:  jussi.jaaskelainen@audioriders.fi
Audio Riders Oy           Tel:    +358-9-276 6820  direct: +358-9-276
68212
Järvihaantie 4            Mobile: +358-40-554 3689
FIN-01800 KLAUKKALA       Fax:    +358-9-879 8045
FINLAND                   WWW:    http://www.audioriders.fi

Re: odbc and bit-field

From
Jussi Jääskeläinen
Date:
Jussi Jaaskelainen wrote:

> Hi!
> Is this bug or is this "bug"...
> I have table with field type 'bit'  acting as "boolean (true/false)" but
> thru ODBC driver (in Win-NT 4) it's reported to be "VARCHAR [254]", so
> it cannot be set to True or False (or 1 or 0)
>
> Problem araised when I tried to move data from MSSQL 7 server to
> Postgresql table using datatransform-services and odbc-drivers
>
> Postgresql server is Linux 7.0.3 at SuSE 7.0
> Odbc-driver is 7.01.00.06  date 06/03/01
>

So, nobody else have this problem and I'm alone with this?!?

Do those who develop that ODBC driver nothing to say?

--
Jussi Jääskeläinen        Email:  jussi.jaaskelainen@audioriders.fi
Audio Riders Oy           Tel:    +358-9-276 6820  direct: +358-9-276 68212
Järvihaantie 4            Mobile: +358-40-554 3689
FIN-01800 KLAUKKALA       Fax:    +358-9-879 8045
FINLAND     WWW:    http://www.audioriders.fi



Re: odbc and bit-field

From
Hiroshi Inoue
Date:
Jussi J蒿skel臺nen wrote:
>
> Jussi Jaaskelainen wrote:
>
> > Hi!
> > Is this bug or is this "bug"...
> > I have table with field type 'bit'  acting as "boolean (true/false)" but
> > thru ODBC driver (in Win-NT 4) it's reported to be "VARCHAR [254]", so
> > it cannot be set to True or False (or 1 or 0)
> >

How are you setting 'Bools As Char' options ?

regards,
Hiroshi Inoue

Re: odbc and bit-field

From
Jussi Jääskeläinen
Date:
Hiroshi Inoue wrote:

> How are you setting 'Bools As Char' options ?

OK!
Two changes...
First I changed field type on psql-database from bit to bool.
Second I unmark "Bool as Char"

--> Field is reported now as 'BIT'-type  what was what I wanted... ;-)

Now I just have to find out solution for (M$SQL) BINARY[21] field what includes
21 bits of binary data...

--
Jussi Jääskeläinen        Email:  jussi.jaaskelainen@audioriders.fi
Audio Riders Oy           Tel:    +358-9-276 6820  direct: +358-9-276 68212
Järvihaantie 4            Mobile: +358-40-554 3689
FIN-01800 KLAUKKALA       Fax:    +358-9-879 8045
FINLAND     WWW:    http://www.audioriders.fi