Help with looping

Markster

New member
Joined
May 18, 2009
Messages
3
Programming Experience
Beginner
Hello,

I'm completely new to vb.net and so far I'm really enjoying it.

I want to be able to loop through records in a table and continue adding a date and value until I reach the end date for that record.
Each time the date gets added I want to show that on a separate row.
i.e customer xyz has a start date of 3/4/09 and an end date of 11/11/09
a new record should be added for xyz every 7 days until it reaches the end date of 11/11.

In access I would use the dateadd function and loop through the recordset while adding a new record to a table.
What is the best way to do this in VB.net?
Can someone point me in the right direction or a link to some tutorials?

Thanks for any help.
 
Thanks for the reply.

Good point I guess it would be better to have a stored procedure and call that in vb.net. I'm unsure how to do that as most of my experience has been with Access.
Do you know of any links to looping in stored procedures and how I would call that in VB.net.

Thanks
Mark
 
read the dw2 link in my signature, section Creating a Simple Data App

Now you know about tableadapters, datatables etc, to translate your existing knowledge, a datatable is soemthing like a recordset; it's a rectangular block of data that can be traversed, updated and the results of the changes sent back to the db. The TableAdapter is the device that does this download/upload of data from/to the database

You should get some idea of where to go, from here :)
 

Latest posts

Back
Top