Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Loses Props After RecordSource Is Recreated
Message
 
To
12/10/1998 15:49:37
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00146001
Message ID:
00146008
Views:
21
Jeff,

Recreate your SQL as a parameterized view and then assing a value to the parameter and requery the view. This will not reset the grid as the grid never loses its recordsource.

The reso your grid resets now is that as soon as you issue the SQL the recordsource for the grid is destroyed and grid goes insane losing all of its settings. With view the structure of the cursor is never destroyed it is simply populated with new data and therefore the grid never loses its recordsource and threfore nevr goes insane..

You can create the parameterized vierw in code at runtime if you don't want it permanently stored in a database.

Create Database Temp
Create View ... && see the help file for details
* Use DBSetProp to set necessary database properties for the view
ldParm = TheDateValue && set the parameter
USE TheView && open the view
* Use cursorsetprop to set the cursor properties you need

Then to repopulate the view you simply;

ldParm = SomeOtherValue
Requery("TheViewName")

It is much simpler to use the view desinger in the database if that is possible.
Previous
Reply
Map
View

Click here to load this message in the networking platform