I have a routine that selects data from a SQL database, and returns it using a SqlDataReader. See my snippet for the code I am using. I am unsure of the best way to get the rowcount of the SQL I executed. Executing the query inside SQL Server Management Studio yields 7 rows.
WHERE (pid = 1)
Dim oCom As SqlCommand = New SqlCommand(sqlStuff.featureList(theId), New SqlConnection(sqlStuff.csString))
Dim oRead As SqlDataReader
oRead = oCom.ExecuteReader
Dim temp As Integer = oRead.RecordsAffected 'returns -1?
Catch ex As Exception