[Mono-list] Strange Error When Populating A DataSet

Jorge E. Gonzalez jgonzalez@optynex.com
Tue, 29 Mar 2005 18:12:46 -0500


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:ddonahue@ccs.neu.edu]=20
Sent: Tuesday, March 29, 2005 4:11 PM
To: mono-list@lists.ximian.com
Subject: [Mono-list] Strange Error When Populating A DataSet

When I populate a DataSet from a pretty simple SELECT statement, I=20
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=20
the values in the column are null (the database won't allow it).  Also,=20
what makes it look even stranger is that, since this DataSet is the=20
return value of a web service, I can browse to the service directly and=20
see exactly what is being returned.  It looks like it works for a bit,=20
but then in the middle of some of the data it adds the error text and=20
throws the exception.

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


Regards,
David P. Donahue
ddonahue@ccs.neu.edu
_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list