Hello,
VB6. I have a class. The class receives a bunch of individual items from
an asp page, then updates the database. My question is what is the best way
you have found to update the database, one record at a time -or- send every
that needs to get written to the database to the class, then execute a
function to update the tables.
Here are the two scenarios.
-1-
For each record I need to insert into the db, Call a method on a class,
passing the items. In the method, execute an insert statement.
-or-
-2-
Have a method, like 'additem'. This method would add the stuff to a
collection in the class. Then, when the asp page is finished adding all its
items, call a method to take each item in the collection and insert it to
the database.
I have done it both ways in the past, but was curious to know the way you
guys do something like this. Thanks for your time.
VB6. I have a class. The class receives a bunch of individual items from
an asp page, then updates the database. My question is what is the best way
you have found to update the database, one record at a time -or- send every
that needs to get written to the database to the class, then execute a
function to update the tables.
Here are the two scenarios.
-1-
For each record I need to insert into the db, Call a method on a class,
passing the items. In the method, execute an insert statement.
-or-
-2-
Have a method, like 'additem'. This method would add the stuff to a
collection in the class. Then, when the asp page is finished adding all its
items, call a method to take each item in the collection and insert it to
the database.
I have done it both ways in the past, but was curious to know the way you
guys do something like this. Thanks for your time.
Comment