G
Guest
Using asp.net and .net framework 2 and SQL server 2000
I am using simple SELECT statement in SP to retrieve data and then bind to a
datagrid but fail to pick up the first record in the dataset:
invConn = New
SqlConnection(ConfigurationManager.ConnectionStrings("Connectstring").ConnectionString)
invConn.Open()
invComm = New SqlCommand(zStrg, invConn)
invComm.CommandType = Data.CommandType.StoredProcedure
invComm.Parameters.AddWithValue("@ClCode", strClCode)
iP = invComm.ExecuteReader
iP.Read()
dgPInv.DataSource = iP
dgPInv.DataBind()
iP.Close()
invConn.Close()
The SP is pulling back the full dataset but code above misses first rec.
with thanks
I am using simple SELECT statement in SP to retrieve data and then bind to a
datagrid but fail to pick up the first record in the dataset:
invConn = New
SqlConnection(ConfigurationManager.ConnectionStrings("Connectstring").ConnectionString)
invConn.Open()
invComm = New SqlCommand(zStrg, invConn)
invComm.CommandType = Data.CommandType.StoredProcedure
invComm.Parameters.AddWithValue("@ClCode", strClCode)
iP = invComm.ExecuteReader
iP.Read()
dgPInv.DataSource = iP
dgPInv.DataBind()
iP.Close()
invConn.Close()
The SP is pulling back the full dataset but code above misses first rec.
with thanks