Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SPT and Lookup forms
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00671147
Message ID:
00671681
Views:
18
Kevin,

>Rod,
>
>>Just when I thought I understood how to implement SQL Pass through in MM, I had a request for an addition to a lookup form that required me to change from a view to SPT. However, it doesn't initialize any cursor so the lookup grid isn't getting initialized properly. The SPT appears to be working properly, but now I need to know what to do on the Grid to get it working properly. It comes up with everything blank and all of the records. If I toggle through and "guess" on a selection, that comes back as the correct selection.
>
>This is one of the big differences between remote views and SQL pass through--with a remote view, you can load the structure of the view by setting NoDataOnLoad to True...with SQL pass through, you don't get a cursor or structure until you actually execute the command.
>
>There's a few ways to get around this. You can programmatically data bind your grid at runtime, after executing the SQL pass through command. If you want to specify binding at design timne, you could execute a SQL pass through command that you know will return an empty cursor at form instantiation--obviously you'd want to do this before the grid instantiates.
>
>Regards,

Thanks for the info. I actually figured it out over the weekend and experimented with both methods. Can you tell me what the "no data on load" is all about with SPT? It doesn't appear to be what I initially thought and is why I got confused. I'm guessing that it isn't actually used, but just wanted to confirm.

Thanks again,
Rod Lewis
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform