Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Update a Lookup Table protected by RI
Message
 
 
À
15/02/2001 08:52:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00475762
Message ID:
00476445
Vues:
43
>>Mark,
>>What does the insert trigger do? It may do some checks on the PK value and if it doesn't adhere to its rules, it returns .F..
>>
>>When you added a new record directly to the table, did you use APPEND BLANK or INSERT INTO. If the former, the trigger may return .F. because the PK field can't be blank.
>>
>
>Larry,
>
>I tried your suggestion. I was using append blank, INSERT INTO worked without triggers firing - no problem.
>
>Still don't know why the RI builder for this database says that fields are set to IGNORE for insert new records into Parent table fields when related Child records do not exist, but it won't let me APPEND BLANK a new record, maybe appends are not suppose to work that way. This system did not make use of surrogate keys, instead PKs/FKs are Custno, Orderno, etc. and some were single field tables, so the new value to append IS the PK value in those rows.
>

Without knowing exactly what the trigger does (i.e. the actual code), it's difficult to tell. It does allow for new keys as using INSERT INTO demonstrates. However, like I said, the trigger may not allow blanks (I don't know) and that's exactly what append blank does. Append Blank actually updates the record and all rules/triggers fire against the blank data set before you can edit it to make it valid. Insert Into writes the values to the fields and then fires the rules/triggers.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform