Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to re-order the records in cursor ?
Message
 
À
17/01/2001 02:38:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00460297
Message ID:
00464987
Vues:
18
Kengwen,
You need to use parameterized views. Check the Help to see exactly how they work. Basically, in the "Filter" clause of the view you put code like
MyInvoice.InvoicNumber = ?cInvNum
Then before you show the grid you set the cInvNum variable to the correct invoice number and requery the grid:
Select MyView
cInvNum = '12345'
Requery('MyView')
Now show the view in the grid and you will see ONLY the data for that invoice number. You use TableUpdate() and TableRevert() just as we explained earlier.

HTH
Barbara


>Dear Barbara and Nick,
> Thank you very much, it works !
> I have another question to ask. Now i will have a grid display in the form. And if i set the grid recordsource to the view, is it suitable to use view ? Since i need to filter the records from the view and only display the filter records on the grid.(eg. the view is an invoice file, and the grid only have to display the item which have same invoice no.)
> And from that, i wish to add new item record or update or delete. And when i add item record, the grid can immediately to display and i which to reorder the records diplay on the grid by the item code.
> Is it suitable to only use view ? and don't need cursor ?
>thanks.
>
>kengwen
Barbara Paltiel, Paltiel Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform