Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CSqlPassThrough.ExecSQL() and CDynamicViewCursor
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00647380
Message ID:
00647392
Views:
12
Hi Chris,

>I am in the process of mixing remote views and SQL Pass through, and have run into a problem.

IMO this would be a good way:

1) Make a new class based on the cSQLPassThrough cursor class.
2) Put SQL-code to return in the cursor class GetSQL method.
3) Put the cursor class into your base DataEnvironment class.
4) Now you can call the cursor class requery method in all your BO's and get the current date and time in a cursor whenever you need it.

See the DevGuide for details about dealing with SQL-PT cursor classes in MM.

Another possibility might be to create an own BO for getting date/time (again with the SQLPassThrough cursor classes) and instantiating it in your base BO class when you need it.

In general, I wouldn't use the BO's ExecSQL() method, since IMO this breaks the 3-tier model. You would code a SQL statement in the emissary part of the middletier, which should only be done in the executant part (data access tier).

HTH,
Armin

Armin Neudert
Regional Director (Stuttgart) of German FoxPro User Group dFPUG

MCP for Visual FoxPro

Expert/Editor of the VFP section in the German Codezone community portal
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform