473,698 Members | 2,452 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to iterate through records in a dataset??

BB
I want to be able to load a table into a dataset in my VB.NET app, check
each field/column of each row/record for missing or incorrect data, then
update a field/column in the record to indicate an error was found.
Eventually, I'll want to save that table data back to the database.

Does anyone have any sample code I can look at for iterating/looping through
records in a dataset?

Thank you!
BB
Nov 20 '05 #1
1 9083
"BB" <co************ *@hotmail.com> schrieb
I want to be able to load a table into a dataset in my VB.NET app,
check each field/column of each row/record for missing or incorrect
data, then update a field/column in the record to indicate an error
was found. Eventually, I'll want to save that table data back to the
database.

Does anyone have any sample code I can look at for iterating/looping
through records in a dataset?


dim row as datarow

for each row in mydataset.table s("table").ro ws

next
--
Armin

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1411
by: Antonio Budano | last post by:
Hi there, How can I iterate through collections starting not from the first item but from an offset? I need to check if a dataset contains records that have some field values that can conflict with some other records. So my code would be like the following: MyDataSet copyDataSet = new MyDataSet(); copyDataSet = myDataSet.Copy();
2
2179
by: martin | last post by:
hi, I am using vb.net. I have wrote a data access class and one of my methods returns a dataset. I would like to iterate through this, although this is proving problematic for me. Can anybody please point out the addition that I would need to the follwoing code.
2
2080
by: Lacka | last post by:
Hi, If I have this sequence: Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(ConfigurationSettings.AppSettings("DB")) Dim dbCommand As System.Data.IDbCommand = New System.Data.SqlClient.SqlCommand Dim dataAdapter As System.Data.IDbDataAdapter = New System.Data.SqlClient.SqlDataAdapter
7
5263
by: Dan Sikorsky | last post by:
How do you iterate thru a dataset to change money fields to a different value? Here's what I have. My dataset is filled directly from a stored procedure. ' Create Instance of Connection and Command Object Dim myConnection As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("ConnectionString")) Dim myCommand As New SqlDataAdapter("OrdersList", myConnection)
12
12252
by: jaYPee | last post by:
I have currently using a dataset to access my data from sql server 2000. The dataset contains 3 tables that is related to each other. parent/child/grandchild relationship. My problem is it's very slow to retrieve records from sql server. I'm using sqldataadapter.fill method to populate dataset. Parent table contains more than 3,000 records and child table contains more than 10,000 records and grandchild table contains more than 90,000...
3
1944
by: vanvee | last post by:
Hi I have an application for my company's HR department where we store resumes for candidates we receive. I have an application that uses VB.Net and ADO.Net and data bindings (through code) to controls on a Windows form. The question I have is that once the database grows and contains a large number of records, I am worried the dataset is going to create too much overhead when the user clicks "show all records" (the full resume which...
7
3674
by: Ryan | last post by:
OK, here's my setup. I have a treeview control that is populated with records from a Product table, and it allows "checking". This is used for my automatic notification system. Say a particular Product is sold, any users who have that boxed checked will get a notification. So my (shortened) database layout is as such: Product Table ProductID (PK) ProductName
0
1427
by: Ohad Weiss | last post by:
Hi all, I've once asked about that topic. but didn't get an answer. I have a dataset based on 4 tables, which have relation between them. The main table presented to the user on textboxes placed on the form, and the rest of the tables presented on textboxes placed on tabpages (tabpage for each table). Here is the code I use:
1
4751
by: Bmack500 | last post by:
I'm using the following subroutine. The two different XML files are identical with the exception of three additional records in the second one. One has 450 records, and the other has 453. After merging, I get 903 records. I guess what I expected was 3 records; just the differences in the two. The two tables have the exact same structure, etc.... So am I misinterpreting how to do this? It seems to me that the merge should produce only...
0
8678
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7737
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4621
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2333
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.