I had the same problem, and I fix whith it:

Select cast(calldate as char) AS 'thisFieldIsDateTime' from MyTable

Jorge Eldis

-----Original Message-----
From: David P. Donahue [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 29, 2005 4:11 PM
To: [email protected]
Subject: [Mono-list] Strange Error When Populating A DataSet

When I populate a DataSet from a pretty simple SELECT statement, I 
notice a strange error:

"Cannot set column Date to be null, please use dbnull instead"

This only happens when I include the Date column from the table (of type

DateTime, naturally), which is somewhat needed in the DataSet.  None of 
the values in the column are null (the database won't allow it).  Also, 
what makes it look even stranger is that, since this DataSet is the 
return value of a web service, I can browse to the service directly and 
see exactly what is being returned.  It looks like it works for a bit, 
but then in the middle of some of the data it adds the error text and 
throws the exception.

Any ideas what might be causing this?  For reference, I'm using Mono 
1.0.6 (or, at least, I should be unless something went wrong when I 
upgraded).


Regards,
David P. Donahue
[EMAIL PROTECTED]
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to