Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to redirect output of a SQL select .....
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00025106
Message ID:
00025109
Vues:
31
>I did a SQL select command like below,
>
>SELECT YELLOWPAGE.NAME, YELLOWPAGE.HOME, YELLOWPAGE.OFFICE,;
> YELLOWPAGE.BEEPER;
>FROM DATA1!YELLOWPAGE ;
>WHERE YELLOWPAGE.NAME = example ;
>ORDER BY YELLOWPAGE.NAME, YELLOWPAGE.HOME)
>
>and wanted to display it's output not by default style,
>But by the Form which contains grid class that I made.
>but I found it's very difficult.
>Is there any way to do it?

Add the INTO clause: SELECT ..... INTO cursor mycursor ORDER BY ......

Then use the cursor as the data-source for the form. Probably a paramaterized view would be even better. When you set up the view, put YELLOWPAGE.NAME = ?cName, and then assign the correct value to cName before you requery the view. The view is dropped into the Form's dataenvironment, and used just like any table. When you wish to refresh the form you assign the correct value to cName, do a requery() and then a form refresh.

Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform