[Mono-bugs] [Bug 329440] New: SqlDataAdapter.Dispose causes Exception

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Sep 28 12:04:57 EDT 2007


https://bugzilla.novell.com/show_bug.cgi?id=329440

           Summary: SqlDataAdapter.Dispose causes Exception
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: i686
        OS/Version: openSUSE 10.2
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Data.SqlClient
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: g.tardini at caleidoscopio.it
         QAContact: mono-bugs at ximian.com
          Found By: ---


To reproduce the problem run the following code, replacing the connection
string and the select command with real values:

//-----------------------------
SqlConnection conn = new SqlConnection("PROVIDE A SQL SERVER CONNECTION
STRING");
conn.Open();

SqlDataAdapter da = new SqlDataAdapter();
System.Data.DataSet ds = new System.Data.DataSet();

SqlCommand selectCommand = new SqlCommand("PROVIDE A SELECT STATEMENT", conn);

da.SelectCommand = selectCommand;

da.Fill(ds);

da.Dispose();
//---------------------------------

Expected result:
No exceptions

Actual result:
Unhandled Exception: System.ArgumentException: An invalid argument was
specified.
  at
System.Data.SqlClient.SqlDataAdapter.System.Data.IDbDataAdapter.set_SelectCommand
(IDbCommand value) [0x00000]
  at System.Data.Common.DbDataAdapter.Dispose (Boolean disposing) [0x00000]
  at System.ComponentModel.Component.Dispose () [0x00000]
  at (wrapper remoting-invoke-with-check)
System.ComponentModel.Component:Dispose ()
  at Test.Program.Main (System.String[] args) [0x00000]


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list