Dear Cor Ligthert,
You mentioned: "...if a row in the database exist with a null value (whatshould be impossible with a good one) while that should not...". My
question
is: Suppose I have a table with columns which allow nulls, then how can I
prevent DBNulls from being placed in that column considering that I prefer
not place an empty string in the column. What effect does placing an empty
string in a column have on the database (specifically in terms of database
size) compared to if a column was set to DBNull?
Additionally, I have seen this thread address most the "why" issues. I
understand most of it. But could you show the "how" factor.
--
L. A. Jones
Cor Ligthert said:
Mark,
DbNull.Value doesn't equal null... The above line will generate an
error
if column1 contains DbNull
In my idea can a column not contain a db.null value. There is just no
value.
I was overreading that it was a strongly typed dataset, which will in
most
types catch the DBNull.value themselves.
Which means that if a row in the database exist with a null value (what
should be impossible with a good one) while that should not, will thrown
an
error.
Cor
Mark Rae said:
if (dataset1.SelectQuery.column1 == null) // there is a null value
DbNull.Value doesn't equal null... The above line will generate an
error
if column1 contains DbNull