[Mono-bugs] [Bug 75574][Maj] New - OdbcDataAdapter.Fill method returns empty DataTable

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Jul 18 07:36:12 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.


--- shadow/75574	2005-07-18 07:36:12.000000000 -0400
+++ shadow/75574.tmp.9713	2005-07-18 07:36:12.000000000 -0400
@@ -0,0 +1,60 @@
+Bug#: 75574
+Product: Mono: Class Libraries
+Version: 1.1
+OS: Red Hat 9.0
+OS Details: Fedora Core
+Status: NEW   
+Priority: Major
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: spek at impaq.com.pl               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: OdbcDataAdapter.Fill method returns empty DataTable
+Description of Problem:
+OdbcDataAdapter.Fill() method returns DataSet with DataTable with zero 
+rows filled.
+Steps to reproduce the problem:
+Run following code with created ODBC connection and database filled with 
+some data.
+Dim connStr As String = "DSN=xxx;UID=xxx;PWD=xxx"
+Dim sqlStr As String = "select * from xxx"
+Dim conn As IDbConnection conn = New OdbcConnection(connStr)
+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)
+Dim rowsFilled As Integer = dataAdapter.Fill(ds)
+Dim dt As DataTable
+For Each dt In ds.Tables
+   Console.WriteLine("dt: " & dt.TableName & "  rowsCount: " & 
+Actual Results:
+dt: xxx rowsCount: 0
+Expected Results:
+dt: xxx rowsCount: 5
+How often does this happen? 
+Always when OdbcDataAdapter is used to fill DataSet with data.
+Additional Information:
+For the SqlDataAdapter method Fill works fine.
+I performed tests with OdbcDataAdapter for SQLServer and Progress 
+databases for Mono under Linux and Windows and results are the same: both 
+return non-filled DataTable.

More information about the mono-bugs mailing list