P
PaulMac
Hello All,
I have a webpage containing a DataGrid control. The datasource is a
DataReader. The code is like so:
AsaCommand Cmd = new AsaCommand( "SELECT ... FROM ...", Db.Connection );
DataGridNet.DataSource = Cmd.ExecuteReader();
DataGridNet.DataBind();
Is it necessary to do an explicit close on the DataReader? In which case,
the code could be this:
AsaCommand Cmd = new AsaCommand( "SELECT ... FROM ...", Db.Connection );
AsaDataReader Reader = Cmd.ExecuteReader();
DataGridNet.DataSource = Reader;
DataGridNet.DataBind();
Reader.Close();
Thanks,
Paul
I have a webpage containing a DataGrid control. The datasource is a
DataReader. The code is like so:
AsaCommand Cmd = new AsaCommand( "SELECT ... FROM ...", Db.Connection );
DataGridNet.DataSource = Cmd.ExecuteReader();
DataGridNet.DataBind();
Is it necessary to do an explicit close on the DataReader? In which case,
the code could be this:
AsaCommand Cmd = new AsaCommand( "SELECT ... FROM ...", Db.Connection );
AsaDataReader Reader = Cmd.ExecuteReader();
DataGridNet.DataSource = Reader;
DataGridNet.DataBind();
Reader.Close();
Thanks,
Paul