Bulk update

Posts   
 
    
hplloyd
User
Posts: 191
Joined: 29-Oct-2004
# Posted on: 13-Sep-2005 12:44:08   

Hi,

I have a table in my Firebird database that has a DateTime column..I need a routine that adds 1 month to each date stored in this column.

My code retreives a collection of the rows I want to update, steps through the collection changing the date property accordingly.

When finished it uses the SaveCollection method to save the values to the database.

This is fine except that it is very slow for larger datasets

Is there a quicker way?

Many thanks in advance

Paul.Lewis
User
Posts: 147
Joined: 22-Aug-2005
# Posted on: 14-Sep-2005 04:49:53   

hplloyd wrote:

Is there a quicker way?

Check out the "Updating a set of entities in the persistent storage" section on this LLBLGen User Manual page:

Generated code - Using the entity collection classes, SelfServicing

It describes how to update rows in persistant storage without reading them first into memory.