Thursday, March 29, 2012

Loop

Hello,

I created a connection to a database and everything is fine. Finally I wrote this:

connection.Open()

**** MyFunction( [ Title Field ], [ Text Field ], [ Link Field ]) ****

connection.Close()

I need to loop trough all records and call a function as I wrote in ****

How can I do this?

Thanks,

Miguel

*** this is very hard :(
You fill dataset with database date and want to loop dataset our what ?

Hi Miguel,

You can use a DataReader to loop through the records in the DB and fire your method. For more info on using DataReader see MSDN.

Hope this helps,

Vivek


Thanks,

I just solved it using a datareader.

I have been using it for sometime and I completly forgot I could use it in this situation.

Miguel

0 comments:

Post a Comment