>>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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only