That looks easy enough. Of course, I have to multiply this by 9 for the number of sets tables to be processed and wrap the entire thing in one or more transactions but it looks doable. The only real issue (and it's always a REAL issue <g>) is error handling in a batch process. What happens if one or more of the inserts fail (I notice the return is Boolean)? I'd like a way to handle the exceptions manually, correct them for the next time around or, at the very least, to report them. Is this possible?
Your second code fragment with #Loadable is very similar to what I use currently. I probably shouldn't even admit this because it's so very "FoxPro", but as currently written, this task uses remote views to append the data to the history tables. It scans for the failed updates/inserts and handles them accordingly. Remote views don't have the pizzazz or credibility of SPT or SPs. That's why the process is being re-written.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement