[Mono-bugs] [Bug 50541][Maj] New - DataRow - SetColumnValue doesn't handle MySql TEXT column type
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 4 Nov 2003 08:46:30 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by ximian@aksi.mdamt.net.
http://bugzilla.ximian.com/show_bug.cgi?id=50541
--- shadow/50541 2003-11-04 08:46:30.000000000 -0500
+++ shadow/50541.tmp.20028 2003-11-04 08:46:30.000000000 -0500
@@ -0,0 +1,50 @@
+Bug#: 50541
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: System.Data
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: ximian@aksi.mdamt.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: DataRow - SetColumnValue doesn't handle MySql TEXT column type
+
+Description of Problem:
+DataRow.SetColumnValue () will throw InvalidCastException when filling a
+data set with a MySQL TEXT type. SetColumnValue method detects the column
+type as System.Array and value type as string and it's not handled.
+
+Steps to reproduce the problem:
+1. prepare a Mysql database and table with this schema:
+CREATE TABLE shopping_place (
+name varchar(200) NOT NULL default '',
+address text NOT NULL
+) TYPE=MyISAM
+fill the table with some data
+2. compile and run attached program. Compile with /r:System.Data /r:ByteFX.Data
+3. it will printthe content of the table in XML format
+
+Actual Results:
+Dataset will be empty. Overall filling process will fail because
+DataRow.SetColumnValue fail to handle the TEXT type
+
+Expected Results:
+DataSet should contains all data, including MySQL TEXT type
+
+How often does this happen?
+always
+
+Additional Information:
+Attached is a patch which catch if the column type is System.Array and the
+value type is string. I don't know whether this is the best solution
+because the original code only honor the column type and never honor the
+value type.
+
+patch against mcs cvs