Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing a grid that uses a SQL statement
Message
 
 
À
08/08/2001 16:52:14
Larry Huisingh
Lockheed Martin Information Technology
Richland, Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00541558
Message ID:
00541700
Vues:
12
Hi!

Try to use 'Grid.RecordSource=Grid.RecordSource' to refrsh the grid and run query again. If this will not help too, bind grid to the alias ('setmembers'), do query manually to that alias in the Load of the form and specify Grid record source as that alais. Than, to refresh the grid, assign empty string ("") to the record source of grid, run query again, than assing record source back.

HTH.

>I have a multi-page form and one of the pages has a grid on it that I want to populate based on a SQL statement. I have set the RecordSourceType to "4-SQL statement" and I have set the RecordSource to the SQL statement itself. When I run the form I can see the grid with the correct values for the first record I am viewing with my form but when I move to another record the grid doesn't update. Does a grid that has a SQL statement for its RecordSource only run the query once? What's the best way to make the SQL statement be executed each time I navigate to another record? The SQL statement I am using is as follows (formatting added while writing this message):
>
>
>select asetdetl.sensor_id, sensors.desc
>  from asetdetl, sensors
>  WHERE ASetDetl.sensor_id = sensors.id AND
>  ASetDetl.acc_set_id = asetmast.acc_set_id
>  into cursor setmembers
>
>
>The table asetmast is the master table that I want to navigate and have the query run each time I go to another record.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform