Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Re-arrange field orders
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00484613
Message ID:
00484689
Vues:
15
>Hello All:
> In my application, data is displayed in a grid. The table is created with vfpxtab.prg. I also use alter table to add 2 fields to the table. I am wondering if I can re-arrange the field orders for that table before it is displayed ?? thanks.

Rather than that, why not just alter the control sources for the columns to fit the actual order of the fields to use in the grid?

Alternatively, create a second table or cursor with the two added fields in the correct order and use APPEND FROM to fill it with the results from the crosstab, rather than using ALTER TABLE.

Or use a SQL SELECT against the result of the xtab adding the fields in your SELECT statement in the right place.

Lots of ways to do this; which is best will depend on your situation. SQL SELECT lets you fill the added fields with values other than the field type default; APPEND FROM will let you use a writable cursor for your results, and specifying the columns programmatically rather than by the field order allows you to manage detailed order of presentation and data source (it can be used in conjunction with the other approaches as well.)
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform