That may be because this is vb.net, where there is no recordset.
You could use myDataSet.Tables("myTable").Rows.Count in vb.net