Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modify structure in code?
Message
 
To
03/12/1998 23:10:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00163936
Message ID:
00163950
Views:
24
Hi Paul,

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
------------- if you cut here, you'll probably destroy your monitor ------------
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform