Thanks, that works.
IIs there a way to set a SetDate variable to a special value that could represent null? This would
make it easier for me since I'm returning a DateTime from a function, and sometimes need to return
something that represents null.
Best wishes,
John
"Sericinus hunter" <se*****@flash.netwrote in message
news:OG**************@TK2MSFTNGP04.phx.gbl...
John wrote:
Hi,
I'm writing a database programme with C# using a dataset. I want to set a DateTime for a
particular
field of a row to null (nulls are allowed for that column). When I use:
newRow.Date_Pub=null;
I get a compile error: "Cannot convert null to 'System.DateTime' because it is a value type".
How do I set the field to null?
There should be newRow.SetDate_PubNull() method generated for the typed dataset.