|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Viewing Data from a DataSetI 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. Without a context, there is no "right approach." There are multiple
approaches because there are multiple circumstances. -- Show quoteHTH, Kevin Spencer Microsoft MVP Professional Numbskull Show me your certification without works, and I'll show my certification *by* my works. "glenn" <gl***@discussions.microsoft.com> wrote in message news:1F2AB0FC-B011-41F4-A05B-90ECCFE805C0@microsoft.com... > 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. > |
|||||||||||||||||||||||