sql der driller lidt ?
Hejsa,Jeg har følgende Function :
Public Function LoadGroupId()
Dim objDb As DbClass = New DbClass
Dim objComm = New SqlCommand
objComm.Connection = objDb.SqlConnect
objComm.CommandText = "Select Top 1 Id From tbl_media_id"
Dim Rs As SqlDataReader
Dim intGroupId As Integer
Rs = objComm.ExecuteReader
If Rs.HasRows Then
intGroupId = Rs("Id")
End If
Rs.Close()
objDb.SqlClose()
Return intGroupId
End Function
Der resultere i denne fejl :
Invalid attempt to read when no data is present.
Og der er et felt ved navn Id og det indeholder også et tal, hvad gør jeg forkert ?
/Websam
