|
-
Feb 4th, 2009, 12:20 PM
#1
Thread Starter
Lively Member
[RESOLVED] Dataset - datatable
Hi, I have a dataset and inside it a dataTable. How can I retrieve the data of the datatable?
My code is this:
objDataAdapter.SelectCommand = New SqlCommand()
objDataAdapter.SelectCommand.Connection = objConnection
objDataAdapter.SelectCommand.CommandText = _
"SELECT distinct Title FROM Outlookbar "
objDataAdapter.SelectCommand.CommandType = CommandType.Text
objConnection.Open()
' Fill the DataSet object with data...
objDataAdapter.Fill(objDataSet, "Outlookbar")
............
I think that untill here I have created a Dataset with a dataTable that has the name Outlookbar. In my example the sql query must return 4 rows(4 data from the table of the database).
So, how can I store its one of these rows (of the dataTable) in a variable for later use?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|