>>and the approch of creating 1 component by query is really not something you want to do.
>>
>>
>
>Huh? What's your problem with this?
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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement