Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox - using a SQL stored procedure as row source
Message
From
28/01/2000 00:06:45
George Simon
GS Data Technologies, LLC
Cincinnati, Ohio, United States
 
 
To
26/01/2000 13:04:10
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00322976
Message ID:
00323936
Views:
21
Janis,

>We have many comboboxes whose list data is created with SQL stored procedures. >Having the call to the stored procedure in the MOUSEDOWN does not work well >with tabbing into the field. Putting the call in the WHEN seems to work well, >but is this a proper place for it? If the cursor for the combobox already >exists, then the call isn't made to avoid unnecessary calls. But depending on >changes to other object values, the stored procedure may need to be run again.

FWIW, I typically do not try to make my comboboxes this intelligent. If I have a situation where a change to another object's value makes it necessary to requery a combobox then I do the requery in the Valid() event of the other object. I also may requery a combo box in the form's Activate() event if there is a possibility that the data in the combobox's rowsource changed.

>Is the REQUERY a place to put a stored procedure call, or can the 'exec >sp_whatever' actually be put in the rowsource property, and then issue a >combobox.REQUERY?

The Requery() method of a combo box or list box is generally used to get the control's list in synch with the control's rowsource.

HTH
George Simon, MCP
Previous
Reply
Map
View

Click here to load this message in the networking platform