Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to handle long field names
Message
De
18/02/1999 08:50:45
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00188442
Message ID:
00188816
Vues:
22
>I'm working with converting a database into VFP 5.0a. (I'm working in WinNT 4.0 SP3). The database was originally done in dBase IV.
>
>The problem that I have is that one of the final tables in the db will have approximately 280 fields and many of these fields have very cryptic names. This is the case for 3 reasons: 1. these fields are various organic and inorganic compounds, 2. the limitation in dBase on the length of field names, and 3. several of these substances have similiar names.
>
>I know that at least one of these limitations still exists in VFP 5.0a, i.e. the max length of a field name in a table that is NOT in a database. Even though my table will be part of a database, and therefore this is not a problem now, I still have concerns. If, for some unknown reason, it is necessary to (temporarily) move the table out of the db, the long field names will be truncated at 10 characters.
>
>My goal is to give these fields meaningful names and be able to move tables, if necessary, in and out of the db for whatever reasons. I'm guessing the only reason would some kind of maintenance.
>
>My questions are:
>1. How do some of you handle this situation of long field names? Do you just use long names and then if there is some kind of maintenance work that needs to be done, you somehow copy the table to a new, empty db? Or is there a better way?
>
>2. Does vfp 6.0 have anything which makes this easier?
>
>As always, TIA
>Marc Mandel
Marc,
I didn't work with dBase after III+ but AFAIK dBase IV also is limited to 254 fields per table + not in a DBC thus a free table. If this is wrong then ignore the rest.
Many ways otherwise, and as practical I can think of, SQL select it into a fox table and add to a DBC. Then either use "modify structure" or "alter table" to change names. "Alter table" might be easier than using table designer. If there is an already running app using oldnames and dbf then instead of a new table, add it as a view and alter names to your taste.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform