Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Passthrough & Control Sources
Message
 
To
23/09/2001 23:25:40
Chuck Berry
Copper State Bolt & Nut Co.
Phoenix, Arizona, United States
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00559838
Message ID:
00560168
Views:
23
Chuck,

>What is the procedure to populate a Grid using SQL Passthrough? I keep getting invalid control source errors when opening up my find form. When I suspend the find form, I am receiving the result set, it's just that the grid is not getting populated.

This is the one drawback of SQL Passthrough. When you use remote views, you can set NoDataOnLoad to .T. and it still loads the structure of the view...you can then bind the grid's column controls to the remote view. With SQL Passthrough, there's no cursor to bind to until you issue the SQL Passthrough command.

There are a few ways you can get around this. If the grid is going to be automatically populated upon instantiation, you can make sure the associated business object instantiates first, and set its nRequeryType to 4 (Requery on Instantiation). If you are using the grid as the result of a search (as in the Find form), you can leave the ControlSources blank at design time, then set them programmatically at run time after the user clicks "Find Now".

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform