I'm trying to connect a radgrid (rgCompDetail) to a stored procedure and I cannot get the records to display. My stored procedure produces a 2 column grad with 5 lines.
here's the code I'm attempting. Any suggestions/corrections?
here's the code I'm attempting. Any suggestions/corrections?
Dim strConn2 As String = regKey.GetValue("DotNetConnectionString")
Dim sConn2 As New SqlConnection(strConn2)
Dim drDetail2 As SqlDataReader
Dim cmdShipdata As New SqlCommand("sp_ShipDetailInCompanyFields", sConn2)
cmdShipdata.CommandType = CommandType.StoredProcedure
cmdShipdata.Parameters.AddWithValue(
"@ProjectId", ProjectID)
cmdShipdata.Parameters.AddWithValue(
"@Company_Id", CustomerId)
sConn2.Open()
drDetail2 = cmdShipdata.ExecuteReader
rgCompDetail.DataSource = drDetail2
rgCompDetail.DataBind()