Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table with no primary key
Message
 
À
17/12/1998 05:15:19
Victor Lapid
Phil. Long Distance Tel. Co.
Manila, Philippines
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00168391
Message ID:
00168431
Vues:
25
Victor,

>Does it mean that i would first issue Insert SQL ,afterwards the remaining >fields that are not added on the access table then i will issue Update
>table so and so WHERE primary key =?key, what if i have no >primary key?

Yes.
Insert adds a record. Update replaces exisiting fields in the inserted record. You should have a primary key, or at least a combination of fields that are unique. Without a key how can you identify records for update or even searching?

Logic should be
INSERT INTO ....
TABLEUPDATE()
UPDATE FIELDS... WHERE (some unique clause to identify the inserted record)
TABLEUPDATE()

PS. The UT is us, Universal Thread. The knowledge base is at www.microsoft.com

-Tom
-TomC
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform