Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored Procedure Question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00982584
Message ID:
00982719
Vues:
35
Ok, so the Data Object contains the SQL code.

If I have a Customer BO, I might have a GetCustomerByID procedure.
The BO would pass the Id to the Data object, which would run a
query for that Id? Sound right?

Now, say I wanted to call stored procs in the DO instead, how would I set up
the stored procedure? If I had the following procedure:
procedure GetCustomerById(nId as integer)
select * from customers where Id = nId
How would I return the results to the BO? Would you have the DO convert the
results to XML, or do that in the BO?

Thanks







>I use SPs in VFP to handle referential integrity and some data validation. Nothing else.
>
>THe BOs don't do the SQL selects. That's the job of the data objects. The BOs call the DOs. The DOs contain the SQL code to handle all the data access.
>
>
>>Ok, I can understand that. Where do Stored Procs fall into
>>this schema?
>>
>>And, if the BO's are using SQL Selects to access the data, then where's
>>the Data Class in all this?
>>
>>
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform