J
Jim Heavey
Hello, I am working on a school project and I decided that I should try to
create a stored procedure for this project.
I was very successful in creating a simple query which returned a bunch of
rows.
I changed the query to count the number of rows being returned in addition to
what I was returning in the query.
When I execute the procedure in QueryAnalizer, I get all the rows, but now I
get each row in it's own little grid.
When I change my ASP.Net program to call this new stored procedure, I only get
a single row when it is bound to the datagrid.
What do I need to get all the rows to show up in my grid?
Here is my vb code...
da.SelectCommand = New SqlCommand("proc_moviesOverdue2", conn)
da.SelectCommand.CommandType = CommandType.StoredProcedure
param = da.SelectCommand.Parameters.Add(New SqlParameter("@totRecords",
SqlDbType.Int))
param.Direction = ParameterDirection.Output
da.Fill(ds, "LateMovies")
dv.Table = ds.Tables("LateMovies")
dv.Sort = lblSort.Text.Substring(8)
lblLateMovies.Text = "Overdue Movie List"
dgLateMovies.DataSource = dv
Page.DataBind()
create a stored procedure for this project.
I was very successful in creating a simple query which returned a bunch of
rows.
I changed the query to count the number of rows being returned in addition to
what I was returning in the query.
When I execute the procedure in QueryAnalizer, I get all the rows, but now I
get each row in it's own little grid.
When I change my ASP.Net program to call this new stored procedure, I only get
a single row when it is bound to the datagrid.
What do I need to get all the rows to show up in my grid?
Here is my vb code...
da.SelectCommand = New SqlCommand("proc_moviesOverdue2", conn)
da.SelectCommand.CommandType = CommandType.StoredProcedure
param = da.SelectCommand.Parameters.Add(New SqlParameter("@totRecords",
SqlDbType.Int))
param.Direction = ParameterDirection.Output
da.Fill(ds, "LateMovies")
dv.Table = ds.Tables("LateMovies")
dv.Sort = lblSort.Text.Substring(8)
lblLateMovies.Text = "Overdue Movie List"
dgLateMovies.DataSource = dv
Page.DataBind()