Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any new UI in VFP 7.0
Message
De
03/07/2001 11:51:16
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00526191
Message ID:
00526338
Vues:
16
>
>I wrote a generic class taking paramters from the client (Based a bit on the ComCodebook) using this class in the UI is very simple to create queries on the fly or calling the by number.
>
>Lets say i need to call Select field1, field2.. from sometable where Pkey = ? . Why would i hardcode that in in prg when i can call a generic class like this:
>
>In the client Dataenvironment class
>
>oCursor.SqlStatement = Select field1, field2.. from sometable where Pkey = ?
>oCursor.aParms(1) = "1234"
>lcParms = oCursor.CreateParms()
>MyRs = oServer.GetCursor( lcParms )
>
>Or my parameters can be stored in my Sqlstatements table and i would call
>
>MyRs = oServer.GetCursor( oCursor.StatementNumber, lcParms )
>
>And i also have a generic class for saving RS
>
>oServer.Save( MyRs )
>
>The classes we build are doing all that + manage the transaction etc.. and i havent seen a situation yet where i had to hardcode statements in our data access component.
>
>There is a lot more to it but that gives you an idea.
>
>Stephane


I see what you are saying. You are correct that using stored procedures will be more efficient and faster. However, COMCodebook was written to support multiple backends, Oracle, VFP, and SQL Server out of the box. Each product has diffent symtax and support for stored procedures, so Flash opted to take a more generic approach.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform