Board index » delphi » Boolean Operator with MSSQL Server 6.5?

Boolean Operator with MSSQL Server 6.5?

    Please help,

    I would like to use a TDBCheckbox component with a boolean field using
MSSQL Server.  The only way I can get the DBCheckbox to work is if I use a 5
character "varchar" datatype <"True" or "False" is stored>.  Because I am
planning on remote access deployment, I don't want 30 of these 5 byte
varchar (boolean wanabe) fields.  I know there must be a way to do a single
byte and still use a DBCheckbox.  I guess I could try to write a component
based on a tinyint datatype but I have never written any dataaware
components and I need this now.

Any help would be greatly appreciated.

please respond to the send address,
Thanx
    Andy

 

Re:Boolean Operator with MSSQL Server 6.5?


Quote
NoSpam wrote:
>     Please help,

>     I would like to use a TDBCheckbox component with a boolean field
> using
> MSSQL Server.  The only way I can get the DBCheckbox to work is if I
> use a 5
> character "varchar" datatype <"True" or "False" is stored>.  Because I
> am
> planning on remote access deployment, I don't want 30 of these 5 byte
> varchar (boolean wanabe) fields.  I know there must be a way to do a
> single
> byte and still use a DBCheckbox.  I guess I could try to write a
> component
> based on a tinyint datatype but I have never written any dataaware
> components and I need this now.

> Any help would be greatly appreciated.

> please respond to the send address,
> Thanx
>     Andy

   Try BIT types, It's Work in same cases ( i'm not sure with a
TDbCheckbox ).

  Marcos

Re:Boolean Operator with MSSQL Server 6.5?


Quote
On Mon, 24 Aug 1998 18:21:08 +1000, "NoSpam" <gl...@netpci.com> wrote:

>    Please help,

>    I would like to use a TDBCheckbox component with a boolean field using
>MSSQL Server.  The only way I can get the DBCheckbox to work is if I use a 5
>character "varchar" datatype <"True" or "False" is stored>.  Because I am
>planning on remote access deployment, I don't want 30 of these 5 byte
>varchar (boolean wanabe) fields.  I know there must be a way to do a single
>byte and still use a DBCheckbox.  I guess I could try to write a component
>based on a tinyint datatype but I have never written any dataaware
>components and I need this now.

>Any help would be greatly appreciated.

>please respond to the send address,
>Thanx
>    Andy

What you're looking for is the "bit" SQL data type. This works fine
with a TDBCheckBox component.

Other Threads