G
Guest
In my datagrid, I call my SP and if I only have a simple select statement, everything comes back fine and all rows get displayed in datagrid using datasource and databind
But if I use a cursor inside the SP (to manipulate data), the data that comes out of the SP can not be displayed in the datagrid. In this case only the first row shows up
Here is aportion of my page_load
System.Data.SqlClient.SqlCommand cm;
System.Data.SqlClient.SqlDataReader dr = null;
System.Data.SqlClient.SqlCommand cm;
//DataSet ds = new DataSet();
cm = new System.Data.SqlClient.SqlCommand();
cm.Connection = ConnectionString;
cm.Connection.Open();
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.CommandText = "[getTransList]";
dr = cm.ExecuteReader();
gridListData.DataSource=dr;
gridListData.DataBind();
dr.Close();
But if I use a cursor inside the SP (to manipulate data), the data that comes out of the SP can not be displayed in the datagrid. In this case only the first row shows up
Here is aportion of my page_load
System.Data.SqlClient.SqlCommand cm;
System.Data.SqlClient.SqlDataReader dr = null;
System.Data.SqlClient.SqlCommand cm;
//DataSet ds = new DataSet();
cm = new System.Data.SqlClient.SqlCommand();
cm.Connection = ConnectionString;
cm.Connection.Open();
cm.CommandType = System.Data.CommandType.StoredProcedure;
cm.CommandText = "[getTransList]";
dr = cm.ExecuteReader();
gridListData.DataSource=dr;
gridListData.DataBind();
dr.Close();