[Mono-bugs] [Bug 54941][Maj] New - Mono.Data.DataTools.FillDataSet(string ConfigSetting, string SelectCommand) bug
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 27 Feb 2004 12:17:06 -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 meddochat@zonnet.nl.
http://bugzilla.ximian.com/show_bug.cgi?id=54941
--- shadow/54941 2004-02-27 12:17:06.000000000 -0500
+++ shadow/54941.tmp.9768 2004-02-27 12:17:06.000000000 -0500
@@ -0,0 +1,135 @@
+Bug#: 54941
+Product: Mono/Class Libraries
+Version: unspecified
+OS: Fedora 1.0
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: meddochat@zonnet.nl
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Mono.Data.DataTools.FillDataSet(string ConfigSetting, string SelectCommand) bug
+
+Description of Problem:
+ The Mono.Data.DataTools.FillDataSet(string ConfigSetting, string
+SelectCommand) will never work because to create a DataAdapter but does
+not specify the Connection well.
+
+Steps to reproduce the problem:
+1. create a console project(or winform)
+2. use the Mono.Data namespace
+3. Put the following in your app.config:
+
+--- begin app.config
+
+<?xml version="1.0" encoding="utf-8" ?>
+
+<configuration>
+
+ <configSections>
+
+ <sectionGroup name="mono.data">
+
+ <section name="providers"
+type="Mono.Data.ProviderSectionHandler,Mono.Data" />
+
+ </sectionGroup>
+
+ </configSections>
+
+ <appSettings>
+
+ <add key="PubsConnStr"
+value="factory=System.Data.SqlClient;server=speedy;database=pubs;uid=sa;pwd
+=" />
+
+ </appSettings>
+
+ <mono.data>
+
+ <providers>
+
+ <provider
+
+ name="System.Data.SqlClient"
+
+
+ connection="System.Data.SqlClient.SqlConnection"
+
+
+ adapter="System.Data.SqlClient.SqlDataAdapter"
+
+ command="System.Data.SqlClient.SqlCommand"
+
+ assembly="System.Data, Version=1.0.3300.0,
+Culture=neutral, PublicKeyToken=b77a5c561934e089"
+
+ description="Microsoft SQL Server
+7.0/2000" />
+
+ <provider
+
+ name="System.Data.OleDb"
+
+
+ connection="System.Data.OleDb.OleDbConnection"
+
+
+ adapter="System.Data.OleDb.OleDbDataAdapter"
+
+ command="System.Data.OleDb.OleDbCommand"
+
+ assembly="System.Data, Version=1.0.3300.0,
+Culture=neutral, PublicKeyToken=b77a5c561934e089"
+
+ description="OLE DB" />
+
+ <provider
+
+ name="System.Data.Odbc"
+
+
+ connection="System.Data.Odbc.OdbcConnection"
+
+ adapter="System.Data.Odbc.OdbcDataAdapter"
+
+ command="System.Data.Odbc.OdbcCommand"
+
+ assembly="odbc"
+
+ description="ODBC" />
+
+ </providers>
+
+ </mono.data>
+
+</configuration>
+
+--- End app.config
+
+you will have to give the PubsConnStr AppSetting a reasonable value so it
+can connect to a database
+
+4. put in you Entry point method:
+
+DataSet Temp = DataTools.FillDataSet("PubsConnStr", "select * from
+existingtable");
+
+Actual Results:
+ By executing the above i get a System.NullReferenceException
+
+Expected Results:
+ The program should do nothing but opening a dataset filled with some
+data
+
+How often does this happen?
+ Always, as it is a mistake
+
+Additional Information:
+ i'll try to attach a diff file