Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP with SQL Server db
Message
 
À
29/06/2001 09:03:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00524532
Message ID:
00525161
Vues:
17
>>"validation rules unique to each cursor."
In my setup, the validation rules are the only thing that differentiate one cursor from another. Otherwise, all behavoirs are inherited from the parent cursor.

>>So you use this technique for tables in your database? Your business objects >>are subclassed from the cursor class?

I have a method in my DE subclass that queries the appropriate SP for the data it needs. When the cursors are loaded into the DE using ADDOBJECT, they are derived from the appropriate cursor class.

During runtime, you get a reference to the DE (form prop) and you can call PEM's directly on each cursor objects or use another object to manage all the cursors simlutaneously. The cursors are little "black boxes" encapsulating all the necessary data management behavior without knowing anything about the outside world.

The bottom line is, all the code necessary for working with SP's on SQL Server which includes figuring out what SP to call based on the type of update, what parms to pass, how to handle failed updates etc, etc is all in the base cursor object and never has to be rewritten.

Charlie
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform