[Mono-devel-list] [BUG] Change in DataRow breaks SqlDataReader
Jörg Rosenkranz
joergr at voelcker.com
Fri Nov 21 10:40:16 EST 2003
Hello Pedro,
> -----Original Message-----
> From: yoros at wanadoo.es [mailto:yoros at wanadoo.es]
> Sent: Friday, November 21, 2003 4:32 PM
>
> Please, send the exception message. I'm fixing DataRow today because a
> few days ago it was broken...
>
Here it is (also contained in the Bugzilla entry):
Exception caught: System.Data.RowNotInTableException: This row has been
removed from a table and does not have any data. BeginEdit() will allow
creation of new data in this row.
in <0x000d5> System.Data.DataRow:get_Item (int,System.Data.DataRowVersion)
in <0x00074> System.Data.DataRow:get_Item (string,System.Data.DataRowVersion)
in <0x00019> System.Data.DataRow:get_Item (string)
in <0x005fc> System.Data.SqlClient.SqlDataReader:GetSchemaTable ()
in <0x00050> (wrapper remoting-invoke-with-check)
System.Data.SqlClient.SqlDataReader:GetSchemaTable ()
in <0x000dd> System.Data.SqlClient.SqlDataReader:NextResult ()
in <0x0005d> (wrapper remoting-invoke-with-check)
System.Data.SqlClient.SqlDataReader:NextResult ()
in <0x0010d> System.Data.SqlClient.SqlDataReader:.ctor
(System.Data.SqlClient.SqlCommand)
in <0x00056> (wrapper remoting-invoke-with-check)
System.Data.SqlClient.SqlDataReader:.ctor (System.Data.SqlClient.SqlCommand)
in <0x0009f> System.Data.SqlClient.SqlCommand:ExecuteReader
(System.Data.CommandBehavior)
in <0x00054> (wrapper remoting-invoke-with-check)
System.Data.SqlClient.SqlCommand:ExecuteReader (System.Data.CommandBehavior)
in <0x00016> System.Data.SqlClient.SqlCommand:ExecuteReader ()
in <0x00050> (wrapper remoting-invoke-with-check)
System.Data.SqlClient.SqlCommand:ExecuteReader ()
in <0x00011>
System.Data.SqlClient.SqlCommand:System.Data.IDbCommand.ExecuteReader ()
in <0x000d8> Bug.MainClass:Main ()
The problem is:
GetSchemaTable creates a new DataRow which is in detached state initially.
Then values are set and accessed in this DataRow object. Accessing them is
not possible anymore.
Joerg.
More information about the Mono-devel-list
mailing list