Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Business Object in n-tier
Message
 
À
14/10/2000 22:51:29
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00429568
Message ID:
00429600
Vues:
14
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform