sqlserver does not have *boolean* datatype.
please see sql book online for more details...
http://msdn.microsoft.com/library/en-us/tsqlref/ts_da-db_7msw.asp
-oj
Quote:> How would i define a column to store data type boolean? Thanks.
> sqlserver does not have *boolean* datatype.
> please see sql book online for more details...
> http://msdn.microsoft.com/library/en-us/tsqlref/ts_da-db_7msw.asp
> -oj
> > How would i define a column to store data type boolean? Thanks.
'bit' can be either 1, 0 or Null.
-oj
> > tarren,
> > sqlserver does not have *boolean* datatype.
> > please see sql book online for more details...
> > http://msdn.microsoft.com/library/en-us/tsqlref/ts_da-db_7msw.asp
> > -oj
> > > How would i define a column to store data type boolean? Thanks.
> 'bit' can be either 1, 0 or Null.
> -oj
> > Thank you. I will use the bit type which can hold only 1 or 0.
> > > tarren,
> > > sqlserver does not have *boolean* datatype.
> > > please see sql book online for more details...
> > > http://msdn.microsoft.com/library/en-us/tsqlref/ts_da-db_7msw.asp
> > > -oj
> > > > How would i define a column to store data type boolean? Thanks.
---------------------
This posting is provided ?AS IS? with no warranties, and confers no
rights.
-oj
Quote:> You can use the Bit data type for this column. It limits the data to be
> either a 1 or 0 value.
> ---------------------
> This posting is provided ?AS IS? with no warranties, and confers no
> rights.
1. Defining Yes/No, True/False or On/Off for Boolean fields
Well, if you're using Microsoft Access, all boolean types are defined as
Long Integers. If the value is 0, it represents No, False or Off. If the
value is any other value, it's Yes, True or On.
About creating the field, that depends a bit on what language you're using.
They all turn out to be almost the same with slight differences in syntax
though. C++ is its own style, VB is almost identical to VBApp except for
the fact that VBApp doesn't allow strict type definition. (I think that's
the way VBApp does things... I tend to stick with the typedef languages and
avoid undeclared types.)
In VB, you'd just make a Long or a Boolean value...
Dim lngYesNo as Long
Dim blnYesNo as Boolean
Both of those will work.
When creating the recordset though... it all depends specifically upon what
you're doing. I suggest experimenting with recordsets...
I'd need more information about what you specifically would like to do.
Tell me exactly what you'd like to achieve, I'll help you from there.
Jim Carlock
3. Boolean as True/False or 1/0
5. Boolean (True/False) Values in mdb file
6. SQL 7 Enterprise RC to SQL 7 Standard final
7. Boolean as True/False or 1/0
8. WANT TO EARN CASH?? NO SCAMS!! NO TRICKS!!
9. True/False fields in SQL Server, How?
10. Insert True/False values into a field of datatype bit
11. SQL, ODBC, Access95: Problems with Query containing True or False-fields
12. Delphi2-Logical Field True<=>Yes,False<=>No Display