Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert overwrites existing record
Message
De
29/04/2003 10:21:22
 
 
À
28/04/2003 17:23:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00782413
Message ID:
00782686
Vues:
14
Brian,

Looking at this raises another question (which Jim has already asked). You should be using the DEFAULT value of the primary key field to call you next key function. It looks like you may be manually calling the next ID function before you do the insert. If you are doing this, there is the remote possibility of problem here.

Craig's article also talks about using the default value...

>
>This effectively orphans the header record (parent with no children).
>
>The insert that causes this would look something like this:
>
>INSERT INTO ADLINES (ADL_KEY, ADL_ADH_KEY, DESCRIPTION, AMOUNT) VALUES (lnNextNum, ADHEADER.ADH_KEY, ADCOST.DESCRIPTION, ADCOST.AMOUNT)
>
>All other tables (adheader and adcost) are positioned on the correct records.
>
>
Steve Gibson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform