Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Your thoughts please
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Versions des environnements
Environment:
C# 1.1
Database:
MS SQL Server
Divers
Thread ID:
01075336
Message ID:
01075369
Vues:
23
Thanks for your reply. Could you please say a few words about why you let the SP generate the ID?
Einar
>I can't say which method is "better" but I let the SP generate the ID and return it to the app.
>
>And speaking of horses...
>
>http://www.sunsethillranch.com/Photos/OurHorses/tabid/156/Default.aspx
>
>>I usually use a stored procedure to add new rows to my tables. I have in some cases passed the new ID (PK) as a parameter to the SP and in other cases allowed the SP to generate an ID (PK) all by itself and then return the ID back to the app. I know this is a case of "six of one and half a dozen of the other" (or as we say around thse parts "a-horse-a-piece"), but I have decided to choose one method over the other for my future development.
>>Any thoughts about which method is better. I am currently leaning towards passing the ID as a parameter to the SP because I think this might be slightly faster.
>>
>>What do you prefer? Do you use SPs exclusively for this (insert, update)?
>>
>>Einar
Semper ubi sub ubi.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform