Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grids & SQL cursors
Message
De
18/06/1996 13:32:16
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00002374
Message ID:
00002507
Vues:
28
>Is there an easy way to make a Grid display a SQL
>cursor???
>
>Tom

There is a trick in FoxPro Advisor April 1996 page 28 «Refresh
Grid.RecordSource» published by Drew Speedie that work fine.

The idea is to base a grid on a view, likely a parameterized one. When it's time to update the view:

=requery()
your grid and all the objects it contains remain INTACT; the displayd data changes.

Since view can only exist in VFP databases, create a temporary database, add the view, and delete everything when done:
*form load
create database temp
set database to temp
create sql view...
* the view is now available to the grid
*form unload
use in
close database temp
erase temp.dbc
erase temp.dcx
erase temp.dct
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform