BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MS/SQL boolean data type

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Larry
Guest





PostPosted: Thu Apr 19, 2007 11:35 pm    Post subject: MS/SQL boolean data type Reply with 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
Kevin Frevert
Guest





PostPosted: Thu Apr 19, 2007 11:42 pm    Post subject: Re: MS/SQL boolean data type Reply with quote



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





PostPosted: Thu Apr 19, 2007 11:42 pm    Post subject: Re: MS/SQL boolean data type Reply with quote



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





PostPosted: Fri Apr 20, 2007 3:08 am    Post subject: Re: MS/SQL boolean data type Reply with quote

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





PostPosted: Fri Apr 20, 2007 4:16 am    Post subject: Re: MS/SQL boolean data type Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.