Solved

vb.net OleDbDataAdapter loop through records

Posted on 2006-07-11
1
993 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
ID: 17082206
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

808 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