Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADO - anyone making it work?
Message
 
À
05/11/1999 12:25:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00287085
Message ID:
00287940
Vues:
23
Hi Craig,

You are basically correct here. The RS is used for passing the data around. The Command Object is for obtaining, updating, deleting, and inserting data. As for the biz rules, you can have them in the COM layer, or as part of the stored procedure layer. There are arguments for going either or both ways...


>>
>>As somebody who has written a thing or to on integrating ADO and VFP <bg>, I would like to make a few comments here....
>>
>>The best use of recordsets is for passing data around and presenting data....period. As a mechanism for updating data, in a word, they suck. There are too many things under the covers that cause too many problems. In reality, whenever you reate an ADO recordset, a Command Object is implicitly created. It is far better to make direct use of the Command Object.
>>
>>However, making use the command object is not enough. The notion of hardcoded SQL Statements in program code that is used for the CommandText Property is loaded with several issues. First, it is not that secure. Through the use of stored procs, you can have a more granular security model through SQL-Server permissions. Second, anytime you have a schema change, you need to alter your your basic data access program logic. In reality, all that should change is:
>>
>>- UI
>>- Any middle-tier business rules that need to reference the new columns.
>>
>>The use of the command object, coupled with the use of stored procedures faciliates this ability.
>>
>>As far as parameterized recordsets, what we are talking about in VFP-speak are parameterized views. Command objects by themselves won't provide the most scaleable solution. A combination of stored procedures and the command object will.
>
>John,
>
>I want to make sure I understand the steps here. Let's say I've retrieved a recordset and the user is looking at data. The user changes the value of the field, then click the Save button. The RS is sent to a middle tier COM object, which applies biz rules to validate things. When the data is valid, a COM object creates a Command object and sends the data, along with any needed parameters to a stored procedure. This is done instead of calling the Update() method of the RS. Do I have this correct?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform