| View previous topic :: View next topic |
| Author |
Message |
Larry Guest
|
Posted: Thu Apr 19, 2007 11:35 pm Post subject: MS/SQL boolean data type |
|
|
This is a really dumb question but how do I store a boolean data type to an
MS/SQL database? I have tried a bit field but no cigar.
If I want to use a TcxDBCheckBox bound to a SQL table, what data type do I
choose?
Thanks
Larry |
|
| Back to top |
|
 |
Kevin Frevert Guest
|
Posted: Thu Apr 19, 2007 11:42 pm Post subject: Re: MS/SQL boolean data type |
|
|
Why didn't the bit field work?
krf
"Larry" <lkillen (AT) charter (DOT) net> wrote in message
news:4627b633$1 (AT) newsgroups (DOT) borland.com...
| Quote: | This is a really dumb question but how do I store a boolean data type to
an MS/SQL database? I have tried a bit field but no cigar.
If I want to use a TcxDBCheckBox bound to a SQL table, what data type do I
choose?
Thanks
Larry
|
|
|
| Back to top |
|
 |
Mike Shkolnik Guest
|
Posted: Thu Apr 19, 2007 11:42 pm Post subject: Re: MS/SQL boolean data type |
|
|
You may declare the INT or CHAR(1) field
On Delphi level you need convert the 1/0 to True/False in
OnGetText/OnSetText event for persistent field
--
With best regards, Mike Shkolnik
Scalabium Software
http://www.scalabium.com
mshkolnik (AT) scalabium (DOT) com
"Larry" <lkillen (AT) charter (DOT) net> wrote in message
news:4627b633$1 (AT) newsgroups (DOT) borland.com...
| Quote: | This is a really dumb question but how do I store a boolean data type to
an
MS/SQL database? I have tried a bit field but no cigar.
If I want to use a TcxDBCheckBox bound to a SQL table, what data type do I
choose?
Thanks
Larry
|
|
|
| Back to top |
|
 |
Craig Guest
|
Posted: Fri Apr 20, 2007 3:08 am Post subject: Re: MS/SQL boolean data type |
|
|
| Quote: | This is a really dumb question but how do I store a boolean data type to an
MS/SQL database? I have tried a bit field but no cigar.
If I want to use a TcxDBCheckBox bound to a SQL table, what data type do I
choose?
|
I have always used BIT fields with no problem.
Craig. |
|
| Back to top |
|
 |
Larry Guest
|
Posted: Fri Apr 20, 2007 4:16 am Post subject: Re: MS/SQL boolean data type |
|
|
Thanks All,
I got the Bit field working.
"Larry" <lkillen (AT) charter (DOT) net> wrote in message
news:4627b633$1 (AT) newsgroups (DOT) borland.com...
| Quote: | This is a really dumb question but how do I store a boolean data type to
an MS/SQL database? I have tried a bit field but no cigar.
If I want to use a TcxDBCheckBox bound to a SQL table, what data type do I
choose?
Thanks
Larry
|
|
|
| Back to top |
|
 |
|