Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP scripting?
Message
De
04/04/2007 10:24:50
 
 
À
04/04/2007 10:13:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01211369
Message ID:
01211991
Vues:
9
>How do I dump all my data in my cursor to my grid? Please help.
>
>
>LOCAL lcSQL
>
>lcSQL = "SELECT * FROM MyTable INTO CURSOR crsGrid1"
>
>EXECSCRIPT(m.lcSQL)
>
>THISFORM.grid1.RecordSource = "crsGrid1"   && this is not working?
>THISFORM.grid1.Refresh
>THISFORM.txtSqlWindow.SetFocus
>
Sam,

If the query worked and EXECSCRIPT() returned .T. you should have a cursor by the name of crsGrid1 open and selected. Therefore it should work. Does your query return a cursor? Is it open? Check it in the debugger step-by-step.

One caveat is that whenever you change a RecordSource in an existing grid (that is if it had any recordSource and was showing data before) it will clear the grid which is unsightly. Turn screen changes off beforehand while you do the switch.


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform