Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update using Delete and Insert Method
Message
De
29/08/1999 07:38:48
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
 
 
À
29/08/1999 06:28:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00258938
Message ID:
00258946
Vues:
10
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform