I create a dataset, but how can I read each row of it? I would like to read each row of the data set and get info from it. Here is what I have.
Dim conn As SqlConnection
Dim cmd As SqlCommand
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim itemcoll(100) As String
conn = New SqlConnection("Data Source=clonerasql;Initial Catalog=CloneStations;Persist Security Info=True;User ID=Admin;Password=xxx")
Dim strQ As String = String.Empty
strQ = "SELECT * FROM dbo.Workstations WHERE AVAILABLEREMOTE='Y' or AVAILABLEREMOTE='y'"
cmd = New SqlCommand(strQ, conn)
da = New SqlDataAdapter(cmd)
ds = New DataSet
So I can I read each row of the dataset and get info from it?
'***********delete rows no longer used in sql table
For Each dr As DataRow In ds.Tables(0).Rows