Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table with no primary key
Message
 
 
To
17/12/1998 05:15:19
Victor Lapid
Phil. Long Distance Tel. Co.
Manila, Philippines
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00168391
Message ID:
00168431
Views:
32
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
Previous
Reply
Map
View

Click here to load this message in the networking platform