easy question (FOR EACH)

  • Thread starter Thread starter Brad
  • Start date Start date
B

Brad

I want to iterate through a dataset. What is the best way to do this? Can
I do something like:

for each datarow in ds
do stuff

Or is there a better way?

Thanks for the information.

Brad
 
Sure did help. Thanks Cor


Cor Ligthert said:
Brad,

almost right
for each dr as datarow in ds.tables(0).rows
do stuff with dr

I hope this helps?

Cor
 
Try something like this

'replace table with your table and tablename with your tablename
'replace yourdataset with your dataset

dim temprow As DataRow

For Each temprow In table.Rows
YourDataset.Tables.tablename.ImportRow(temprow)
Next
 

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

Back
Top