[Mono-dev] DataTable bug in 1.1.13

Michael Hunley michael at codecobblers.com
Sun Feb 5 03:21:24 EST 2006

This is partially to report an issue in a somewhat fringe aspect of 
DataTable and partially a query to see if others have run into this 
and if there is a known fix.

I am merging two DataTables based on the key.  The resulting table's 
schema is a superset of the columns from each table.  On windows I am 
building using .NET 2003 and the 1.1 framework.  On Mono I was 
originally using 1.1.10 and have just switched to 1.1.13 on a Linux 
Redhat 9 machine.   This problem did not occur in Mono 1.1.10, but 
showed up immediately after switching to 1.1.13.

One of the two tables is a result of a SELECT using the MySql .NET 
connector (latest).  The other is constructed from data mining, but 
has a subset of the columns of the SQL query.  Under Mono 1.1.13 I 
suddenly get an exception that one of the merged lines (an added 
line) cannot have a specific column be null.  It is one of the 
columns that is not present in the mined data, so it gets set to the 
default (which is null).

Under MS .NET 1.1 the DataTable from the SQL query does not have any 
of the schema set, like whether a column can be NULL or its default 
value.  Under Mono 1.1.13 part of it is set.
It appears that Mono is now correctly getting the flag that a column 
cannot be NULL from the SQL schema, but is not correctly getting the 
default value.  Since I am building the MySQL .NET connector from 
source on both targets, this is an issue under Mono, not an issue 
within the MySQL code I think.

I have not tried this using the Mono 2.0 or MS .NET 2.0 version.

Anyone have a fix for this?  I am currently setting the 
DataTable.Columns default values for those that cannot be NULL to 
make sure I can make insertions that do not set those fields as I would in SQL.


Michael Hunley
Managing Partner/Senior Engineer
Code Cobblers, Inc
Skype: hunleyexpress
Office: (760) 233-1307
Fax: (858) 433-0513
This message may contain confidential and privileged information. Any 
unauthorized distribution,
copying or disclosure of such information is strictly prohibited. If 
you have received this message in
error, please advise the sender immediately and delete all copies of 
this message from your system.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060205/39df715f/attachment.html 

More information about the Mono-devel-list mailing list