>Naomi,
>Probably you do not understand what I'm trying to say.
>-Keep your SP as is.
>-Copy functions outside to a prg also. In prg version move declaration outside generator function.
>-In your 'load' routines instead of leaving pk out to call default fill it from prg based one.
>Cetin
Looks like adding new class procedure CreateGUID() and adding PK field into each insert command slowed down the process even more.
I moved create PDF at the end of the procedure (after CommitChanges) to do it once for all records.
If it's not broken, fix it until it is.
My Blog