Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating a relational database via an asp
Message
De
04/06/2003 04:18:45
Philip Jones
Cornwall County Council
Truro, Royaume Uni
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00795654
Message ID:
00796023
Vues:
17
No, I'll try and explain.
Say I put an address in an address table. The primary key value for that record will be generated automatically by sql server when I insert the other values.
Next I want to add some personal details to say a person table. One of those details will be a foreign key value for the record in the address table.
This will be the value that was automatically generated when I inserted my record into the address table.
So to get the foreign key value for the address I'll have to go back and read it from the address table.

How can I be sure that the I am reading the correct record? I could go to the bottom of the address table but what if someone else was adding details, via another asp form, at the same time.

In short..
If I add a record to a table.
How can I get the primary key value of the record that I added and be absolutely sure that it is correct?


Hope this is a better explaination.


Phil.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform