Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.net + continue until end of Access database

Status
Not open for further replies.

mizzy

IS-IT--Management
Jun 28, 2001
277
0
0
AU
Hi there,

I have checked every where for the answer to this question but no joy. Usually this means that the answer is obvious but some help would be appreciated.

I am processing an MSaccess database. I can connect to the database and I am currently processing each record in the database using a button i.e. click on the button to process the next record.

I wish to change the click so that the database is processed until there are no more records in the access database.
I have been trying "While Not EOF" and stuff like that but nothing is working.

How would I do this, continue processing until I have
reached the end of the access database
Many thanks,
 
Many way can do it. Here is datareader drSQL:
strSQL = "SELECT * FROM tblCustomer"
cnSQL = New SqlConnection(ConnectionString)
cnSQL.Open()
cmSQL = New SqlCommand(strSQL, cnSQL)
drSQL = cmSQL.ExecuteReader()

Do While drSQL.Read()
'do something
Loop
 


Cheers ,
Thanks for the help,
All up and running now.
Regards,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top