Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any new UI in VFP 7.0
Message
 
To
03/07/2001 11:20:22
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00526191
Message ID:
00526333
Views:
19
>>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
Map
View

Click here to load this message in the networking platform