Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index name too long
Message
De
01/04/1998 04:19:55
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00088612
Message ID:
00088618
Vues:
42
>I have a grid populated with a cursor from a SQL statement. After the cursor is created, I create indexes ASC and DESC to be used in the header click event. All works well except when the index is longer than 10 characters. I am using a for loop to loop through the fields of the cursor and create corresponding ASC and DESC indexes using the name of the field, which is some cases, is longer than 10 characters...this is my problem. Does anyone have any ideas/techniques to shorten the length of the tag names so I can be sure that they aren't longer than 10 characters? Any ideas appreciated!!!
>
>Thanks
>
>John.
John,
You could do something like this.
*For creating tags
dimension aTags[fcount(),2]
for ix=1 to fcount()
 aTags[ix,1] = field(ix)
 aTags[ix,2] = "TAG"+padl(ix,3,"0")
 index on &aTags[ix,1] tag (aTags[ix,2])
endfor

*For header click to determine tagname
for ix=1 to fcount()
 if lower(this.parent.controlsource) == ;
    lower(this.parent.parent.recordsource+"."+field(ix))
    cTagName = aTags[ix,2]
    exit
 endif
endfor
set order to tag (cTagName)
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
Répondre
Fil
Voir

Click here to load this message in the networking platform