dataset tables row count 'zero'
Posted
by
James123
on Stack Overflow
See other posts from Stack Overflow
or by James123
Published on 2011-03-11T15:51:19Z
Indexed on
2011/03/11
16:10 UTC
Read the original article
Hit count: 382
I am using dataadapter.Fill() into dataset. But dataset returning tables rows count zero (0).
When I ran same sp in sql mgmt. It is returning two tables data.
If attributeId = 1 Then
spString = "USP_group_1"
ElseIf attributeId = 2 Then
spString = "USP_group_2"
ElseIf attributeId = 3 Then
spString = "USP_group_3"
End If
sqlcmd_q.CommandTimeout = 120
sqlcmd_q.Connection = sqlCnn
sqlcmd_q.CommandText = spString
sqlcmd_q.CommandType = CommandType.StoredProcedure
sqlcmd_q.Parameters.AddWithValue("@client_id", clientId)
Try
sqlCnn.Open()
Dim daGrid As New SqlDataAdapter(sqlcmd_q)
daGrid.Fill(dsGrid)
daGrid.Dispose()
Return dsGrid
I don't understand why this happening?
© Stack Overflow or respective owner