Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Business Object in n-tier
Message
 
 
To
14/10/2000 22:51:29
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00429568
Message ID:
00429600
Views:
16
Hi John..

The code should be in either a stored procedure (ADD, Delete, Insert) - or it should be in a trigger. RI code belongs with the database. That way, anything that hits the database will be subject to the same rules.

So, where do objects kick in ?

Your objects act as the interface to your add, delete, and insert operations. Ideally, you are using stored procs for everything. Your stored procs can then trap for errors and in turn, pass these errors back via the ADO Command Object.

For more information on the proper way to architect and construct an n-tier application: consult: http://www.takenote.com/dc2000.htm. Even if you don't use dataclas, the help docs are a good resource for architecture ideas.

Best,

< JVP >




>1. Where should I place the code of enforce the integrity between 2 or more tables? e.g., If I have one-many relationship tables. Once user need to delete the master record, I need to check the any exisiting child records related to the master. I should call the function (check integrity) in my Master object (e.g. customer), a new object (e.g. customerBooking), call it directly in User sevice, place it as stored procedure or define the integrity in DBMS and trap the error ??
>
>2. How about insert function as the situation above?
>
>Thank you
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform