Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to avoid code repetition
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
How to avoid code repetition
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01069867
Message ID:
01069867
Views:
59
Hi everybody,

This is a generic problem and I'd like to hear your opinion.

We have Trans table, the child Trans_Status_Codes and another table for saving the Trans Events.

When we change the status code, we also need to update the history table (make all previous status records inactive and insert a new record with the new status code). We also need to put information about this "event" in the Trans Events table.

Now, all this logic is handled by business objects. So, when you're working with the form and making changes interactively, the business objects take care of the updating Trans and related tables.

Now we need to implement the same logic when doing this process in a Batch mode. In the batch we're not working with business objects, but using mostly stored procedures or procedural coding to do massive updates. How can we share the same logic and functionality between BO and procedural coding?

To be honest, I do not see an easy way to do so.

Thanks in advance for your ideas.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform