Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Beware of ri builder
Message
De
25/08/1999 12:24:34
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Beware of ri builder
Divers
Thread ID:
00257491
Message ID:
00257491
Vues:
52
I have 3 tables, named :
1: Lista_precio_cliente (numero_lista, nombre_lista.) indexed on numero_lista tag num_lis
2: descuento (numero_lista, codigo_cliente, valor_descuento)
3: cliente (codigo_cliente, nombre_cliente) indexed on codigo_cliente tag cod_cli
Descuento table is related to the other 2 tables, and has restriction rules to each one. (matching records must exist in both lista_precio_cliente and cliente to allow record insertion in Descuento table)
Due to names of these tables, the code generated by the RI builder causes the insertion trigger fail, because the moment comes when it tries to set order to COD_CLI on Lista_precio_cliente.
This might be fixed by just changing the name of lista_precio_cliente to something else not ending with “cliente” (or changing the name of cliente to something else).
I have also noticed that if I create the relation between descuento and cliente BEFORE the relation between descuento and lista_precio_cliente, the problem doesn’t appear.
Maybe the sintax of the english languaje avoid the occurrence of a case like this, because in english these tables would be named as:
1: Cust_price_list
2: Discounts
3: Cust
Avoiding the end of the 1st table to be exactly the name of the 3 rd the problem does not arise.
There´s a better life... Just it´s more expensive!
Cristóbal Manrique M.
Répondre
Fil
Voir

Click here to load this message in the networking platform