For the first part of your question you don't need the object to hold the data. You can access the row and column of the dataTable in the dataset. I normally simplify this by using a dataTable instead.
Dim dt As new DataTable
myDA.Fill(dt)
SystemNameTextBox.Text = dt.Rows(0).Item(0)
LocationNameTextBox.Text = dt.Rows(0).Item(1)
LocationIDTextBox.Text = dt.Rows(0).Item(2)
SystemIDTextBox.Text = dt.Rows(0).Item(3)
As for your second question the answer above may help.
Dim SystemID As String
SystemID = myDB.Fill(db, "blsys_systems") Trying to allocate a filled dataSet to a string isn't correct. Just use
myDB.Fill(db, "blsys_systems") to fill the table "blsys_systems" in the dataSet db and then access the Row(0).Item(0) to get the systemID out. You could also forego the whole dataAdapter approach and use executeScalar() function of the command object to return the string if you are only expecting one result.
hericles
Practically a Posting Shark
823 posts since Nov 2007
Reputation Points: 136
Solved Threads: 167