Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
External orders
Message
De
12/01/2003 17:06:49
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00740835
Message ID:
00740844
Vues:
15
If you are using VFP7 or above you can use Database events to handle this automatically like this
PROCEDURE dbc_BeforeOpenTable
LPARAMETERS cTableName

if lower(cTableName) == 'customer' and not used('dealer')
  use dealer again in 0
endif
Glenn

>Hi
>
>I have a customer table which has an optional link to a dealer table. I want to be able to order the customer table (in a grid) by the dealer name.
>
>I can create an index on the customer with an expression of
>
>IIF(INDEXSEEK(d_key,.T.,"DEALER","D_KEY"),Dealer.name,SPACE(40))
>
>
>but then I have to have the dealer table open every time I want to use the customer table (including in the form designer) While I can do this, it seems messy.
>
>The user needs to be able to select which order they want, most of which are on the customer table. I can create an external index each time I need to use the index but this also seems a bit messy.
>
>Is there a better way???
>
>Regards
>Geoff Scott
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform