Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing a grid that uses a SQL statement
Message
From
09/08/2001 12:47:27
Larry Huisingh
Lockheed Martin Information Technology
Richland, Washington, United States
 
 
To
09/08/2001 10:40:26
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00541558
Message ID:
00541866
Views:
13
Erik,

Thank you. This works quite nicely and is easier to modify. It appears that using the grid's SQL statement capabilities aren't as nice as I thought they were. Using your method is how I had done it in FPW and I thought that maybe I could use a new (to me) VFP feature instead. Sometimes the tried and true are best.

Larry

>
>It will make things much cleaner for you if you put your SQL statement in a form method, have its results go into a cursor, and make the grid's recordsource that cursor. Then refreshing the grid is as easy as:
>
>THISFORM.mygrid.RecordSource = ""
>THISFORM.RunMyQuery()
>THISFORM.myGrid.RecordSource = "MyCursor"
Larry Huisingh
Lockheed Martin Information Technology
Richland WA USA
Previous
Reply
Map
View

Click here to load this message in the networking platform