[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
Thu, 13 May 2004 15:47:12 -0400 (EDT)
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 miguel@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=50541
--- shadow/50541 2004-05-13 15:47:12.000000000 -0400
+++ shadow/50541.tmp.29061 2004-05-13 15:47:12.000000000 -0400
@@ -0,0 +1,60 @@
+Bug#: 50541
+Product: Mono: Class Libraries
+Version: unspecified
+OS: unknown
+OS Details:
+Status: NEW
+Resolution:
+Severity: Unknown
+Priority: Major
+Component: Sys.Data
+AssignedTo: sumadevi@novell.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
+
+------- Additional Comments From ximian@aksi.mdamt.net 2003-11-04 08:47 -------
+Created an attachment (id=5865)
+test case
+
+
+------- Additional Comments From ximian@aksi.mdamt.net 2003-11-04 08:47 -------
+Created an attachment (id=5866)
+the patch
+