Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert overwrites existing record
Message
From
29/04/2003 10:21:22
 
 
To
28/04/2003 17:23:48
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00782413
Message ID:
00782686
Views:
15
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
Previous
Reply
Map
View

Click here to load this message in the networking platform