Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update using Delete and Insert Method
Message
From
29/08/1999 07:38:48
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
 
 
To
29/08/1999 06:28:50
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00258938
Message ID:
00258946
Views:
9
Hi John,
You must use what may seem like two primary keys. Each record needs a truely primary key that uniquely identifies it. You probably thought you had that now, but you don't.
When you delete a record, it's still in the table and still able to be RECALLed. So you can't INSERT a record with the same key you just deleted. As an example, take an Invoice record. It needs a structure like this, if you're going to DELETE and INSERT upon updating the record.
ID - Primary Key
InvoiceID - Key for this Invoice. Not a candidate, not a primary, but it does point to a unique and specific invoice.
Charlie


>Hi,
> I am going to implement an update table operation using DELETE it and then Insert the record again method. However, I got an error message that uniqueness of the index.
> How would DELETE and Insert operate actually for indexed table?
>
>Thank you
Charlie
Previous
Reply
Map
View

Click here to load this message in the networking platform