Help with Access Problem

jotaeva

Member
Joined
Sep 2, 2009
Messages
8
Programming Experience
Beginner
I have an App in VSN 2005 using a Access DB.

Have 3 tables: Alumnos, Meses and Pagos all related with IDal (PK)

The problem:

In the meses table I need to insert every 1st day of every montht 83 records with these fields:

IDal (PK)
nombre: different in each record and taken from the alummnos table
valor: the same for every records
mes: (month to pay) The same for all records
status: The same for all records

I have a sub that insert the record but one by one. My question is: exists some process like a For.. Next to populate all te records in other different form?

Thanks for your help.
 
How about just placing your INSERT INTO query in a FOR/NEXT loop
VB.NET:
Expand Collapse Copy
Dim i As Integer = 0
For i = 0 To 82
     'your insert code
Next
 
You can fill a dataset/datatable with your new records and then set a dataadapter to update the entire datatable with one call.
 
Back
Top