"Meelis Lilbok" <me***********@deltmar.ee> wrote in message
news:Om**************@TK2MSFTNGP10.phx.gbl...
Hi James
This "schema" thing is unknown for me :))
Im filling dataset from SQL database and then try to get DataType like
this
MyDataSet.Tables("table").Columns("name").AllowDBN ull
Meelis
"James Jardine" <ja***********@geoage.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
"Meelis Lilbok" <me***********@deltmar.ee> wrote in message
news:eu**************@TK2MSFTNGP11.phx.gbl... Hi
How to get information from DataSet, allows the field NULL values or
not?
If i fill DataSet and read
"MyDataSet.Tables("table").Columns("name").AllowDB Null"
then this returns always True
Regards;
Meelis
How are you loading the schema for the data? are you filling this from a
sql database or some fashion like that? I think the problem is that no
schema is loaded so it doesn't know if AllowDBNull is true or false based
on the source table.
You have to call the FillSchema method of your dataadapter before you call
your .Fill. This will fetch the allowDbNull information from the database.
Of course.. this increases the number of trips to the database but if you
need the information this is how you get it.
http://msdn2.microsoft.com/en-US/lib...y5(VS.80).aspx this link is
to 2005 but it is the same concept as 2003 and 2002.