Viewing Data from a DataSet

G

Guest

Hello,

I have a DataSet that was returned to me by a QueryMethod( ).

I have drilled down to the column level as follows:

Dim ds As System.Data.DataSet
Dim dt As System.Data.DataTable
Dim dr As System.Data.DataRow
Dim dc As System.Data.DataColumn

ds = QueryMethod ( )

For Each dt In ds.Tables
For Each dr In dt.Rows
For Each dc In dt.Columns
if dr(dc) = "owner" then
' GET THE DATA IN THE COLUMN OF A ROW OF A
TABLE
end if
Next dc
Next dr
Next dt

Am I using the right approach. Thanks for any replies.
 
K

Kevin Spencer

Without a context, there is no "right approach." There are multiple
approaches because there are multiple circumstances.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top