Even though this was written as SPT, effectively everything happens on the backend. It could all be put into a SP, but then I didn't have the sorts of control knowing for sure that each piece worked. I'm moving data around for 15 tables total the post is just a fragment.
With views you have to pull all the data down the wire and then push it back up.
>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.