473,513 Members | 2,399 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

1-0-DBNull

Hi,

I'm using access database and a table has a boolean column.
I want to hold 1,0 and DBNull values in this column.
But I cannot DBNull value, how can I hold DBNull value in the access
database in boolean column?
Jan 7 '06 #1
3 1790
I don't think boolean columns support dbnull

Brenny wrote:
Hi,

I'm using access database and a table has a boolean column.
I want to hold 1,0 and DBNull values in this column.
But I cannot DBNull value, how can I hold DBNull value in the access
database in boolean column?

--
Benny Raymond
http://bloatedcowsoftware.com
Jan 7 '06 #2
You can't. A boolean column can hold one of exactly *two* values, true or
false. If you need a null value, use a numeric field.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.

"Brenny" <br***********@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi,

I'm using access database and a table has a boolean column.
I want to hold 1,0 and DBNull values in this column.
But I cannot DBNull value, how can I hold DBNull value in the access
database in boolean column?

Jan 7 '06 #3
Brenny,

When creating the table, you should set the "required" property for the
column to false. It should then accept null values.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Brenny" <br***********@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi,

I'm using access database and a table has a boolean column.
I want to hold 1,0 and DBNull values in this column.
But I cannot DBNull value, how can I hold DBNull value in the access
database in boolean column?

Jan 7 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.