[Mono-bugs] [Bug 75944][Maj] New - OdbcDataAdapter.Fill method crashes with 'real' data type

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Aug 31 06:25:26 EDT 2005


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 spek at impaq.com.pl.

http://bugzilla.ximian.com/show_bug.cgi?id=75944

--- shadow/75944	2005-08-31 06:25:26.000000000 -0400
+++ shadow/75944.tmp.19351	2005-08-31 06:25:26.000000000 -0400
@@ -0,0 +1,66 @@
+Bug#: 75944
+Product: Mono: Class Libraries
+Version: 1.0
+OS: Red Hat 7.3
+OS Details: Fedora Core
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: Sys.Data
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: spek at impaq.com.pl               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: OdbcDataAdapter.Fill method crashes with 'real' data type
+
+Description of Problem:
+Method Fill throws 'Program type out of range exception' (see an 
+attachment) when try to load the column with the 'real' data type in non-
+empty table.
+
+Steps to reproduce the problem:
+Create db in the Progress db using following script:
+
+CREATE TABLE "EdTableName" (
+	"StoreKey" int NOT NULL ,
+	"BatchNo" int NOT NULL ,
+	"RecordType" smallint NOT NULL DEFAULT 31,
+	"RealField" real,
+	CONSTRAINT "EdPrim" PRIMARY KEY 
+		("StoreKey","BatchNo")	
+);
+INSERT INTO EdTableName (StoreKey, BatchNo, RecordType, RealField) VALUES
+(1, 1, 100, 22);
+
+Run program:
+    Dim connStr As String = "DSN=xxx;UID=xx;PWD=xx"
+        Dim sqlStr As String = "select * from EdTableName"
+
+        Dim conn As IDbConnection = New OdbcConnection(connStr)
+        conn.Open()
+        Dim command As IDbCommand = conn.CreateCommand()
+        command.CommandText = sqlStr
+
+        Dim dataAdapter As IDbDataAdapter = New OdbcDataAdapter
+        Dim ds As New DataSet
+        dataAdapter.SelectCommand = command
+        'dataAdapter.FillSchema(ds, SchemaType.Source)
+        'dataAdapter.FillSchema(ds, SchemaType.Mapped)
+        Dim rowsFilled As Integer = dataAdapter.Fill(ds)
+
+        Console.WriteLine("rowsFilled: " & rowsFilled)
+ 
+
+Actual Results:
+Program throws an exception (see an attachment)
+
+Expected Results:
+rowsFilled: 1
+
+How often does this happen? 
+When sql statment returns at least one row with 'real' data type.
+
+Additional Information:


More information about the mono-bugs mailing list