Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index Names
Message
De
17/05/2006 21:55:53
 
 
À
17/05/2006 18:09:26
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01122960
Message ID:
01123078
Vues:
28
>Hi Alan
>
>>>>In the system capacities section of the VFP9 help file, it says that field names can be 128 characters in a database. It also talks about the file sizes of a table and an fpt. Is there any documentation on the length of an index name, or on the size of an index file?
>>>>
>>>>It appears that even though a field name can be up to 128 characters (I don't have any that long), the index name will still be pared down to 10 characters. Until now, I haven't had occasion to run into this issue, but now I have. Am I missing something, or is this just one of those undocumented cracks I'm going to have to work around.
>>>>
>>>>Thanks
>>>
>>>Check INDEX Command in Help:
>>>
>>>TAG TagName
>>>Specifies the name, or tag, for the index generated by eExpression and stored in a compound index (.cdx) file. Tag names must begin with a letter or an underscore (_) and can consist of any combination of up to 10 letters, digits, or underscore characters.
>>
>>Yeah, that's real unfortunate. I pulled all the tables from a MS SQL database into vfp tables, and now I have a real problem with indices. Oh, well, lots of work ahead I guess. The other problem is that the primary keys are integer but unfortunately the designers of the system decided, for whatever reason not to create system generated ID's and instead used meaningful fields in the data for the keys, and that meant they required multiple fields for uniqueness. What a headache.
>
>You can create a table with long index tag names and a unique 10 digit code. Then a UDF can get the physical index tag name from the long tag name.
>
>
>lcTagName = TagName("ThisReallyIncrediblyLongTagDescription")
>SET ORDER TO TAG (m.lcTagName)
>
>
>That should help make this a less onerous task.

It's an idea worth some time. I don't think anything is going to make this a less onerous task though. I have to manually create all the indices, and the way they've set it up, in far too many cases, the tags themselves are going to look like Str(IntegerField1) + Str(IntegerField2) because uniqueness depends on more than one integer field - that is, unless you know an easier way of compounding integer fields into an index tag. And then the foreign key indices will have to follow the same pattern. I'd like to get my hands on the person who came up with the SQL database design.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform