Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modify structure in code?
Message
De
04/12/1998 19:53:24
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00163936
Message ID:
00164367
Vues:
30
... in this case, my solutions don't help too much. You still need to change the SELECT when adding a new language.

Vlad

>I have written a multi-language bird-recording application and I have two tables that I want to reorder. The first table contains birdnames and the second contains words/different phrases and so on, to populate buttons, labels, messageboxes etc. The preferred language for the application gets all the phrases from the second table.
>
>In my code, I use FIELD() on the birdnametable to create a popup containing all the available options - swedish, english, danish (and some more). Dependning on the preferred language for the whole application, I want to show the preferred language as first item in the popup.
>
>I use the order of the fields in the birdnametable to add/change labels and textboxes (caption and controlsource). If I could reorder the fields, I would be able to have the preferred language as the first language.
>
>If I want to add a language to my application I only add a column to the selected table. Nothing else. I don't have to change any code.
>
>Thats why I want to be able to reorder the fields.
>
>/Pierre
>
>
>>Keep an empty table with your temp structure. At runtime, copy this struct to a temp table and append from the old table.
>>
>>Or, better, :) use a SELECT SQL:
>>
>>select id, english, danish, swedish from oldtable into cursor temptable
>>
>>But why do you need something like this? I've never needed to change the order of the fields in a table.
>>
>>Vlad
>>
>>>I am looking for a way to reorder the fields in a table. I have a table like this:
>>>
>>>id N(4,0)
>>>swedish C(30)
>>>english C(30)
>>>danish C(30)
>>>
>>>and I want it temporarily to look like this:
>>>
>>>id N(4,0)
>>>english C(30)
>>>danish C(30)
>>>swedish C(30)
>>>
>>>This can easily be done in the Table Designer but I want to do it by code!
>>>
>>>/Pierre Unge, Sweden
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform