Loop

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

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
 
You don't have any records to loop through just because you have a
database connection.

First you have to create a Command object with a query that specifies
the data that you are interrested in. Then you have to execute the
command so that you get a result. If you for an example use a DataReader
to handle the result, you can use the methods of the DataReader to loop
through the result.
 

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