Solved

vb.net OleDbDataAdapter loop through records

Posted on 2006-07-11
1
975 Views
Last Modified: 2006-11-18
how do I use a OleDbDataAdapter to loop and print out values from a table.

something like what I have below

select id, name from mytable

for i=0 to results.count
  debug.print results("ID")
  debug.print results("name")
next
0
Comment
Question by:jackjohnson44
1 Comment
 
LVL 17

Accepted Solution

by:
ZeonFlash earned 500 total points
Comment Utility
Dim ds As DataSet
Me.OleDbDataAdapter1.Fill(ds)

For Each tbl As DataTable In ds.Tables
    For Each row As DataRow In tbl.Rows
        MsgBox(row.Item("ID") & " " & row.Item("name"))
    Next
Next
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video discusses moving either the default database or any database to a new volume.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now