Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parent & Child
Message
De
09/08/2002 13:45:00
 
 
À
09/08/2002 13:21:58
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Divers
Thread ID:
00686093
Message ID:
00688094
Vues:
35
BOb,

The UPDATE SPs have named parameters for every column in the table, with a default of NULL. When calling the SP, only changed columns are sent and the T-SQL UPDATE is:
UPDATE MyTable
SET MyField1 = ISNULL(@MyField1, MyField1),
    MyField2 = ISNULL(@MyField2, MyField2)

// etc for each column
~~Bonnie


>I am curious how you strucutre your UPDATE sp? Do you just send ALL the values of all the fields, or do you just send the values of the fields that have changed data? If the former, does your SP create dynamic SQL to do the update?
>
>I basically ask because I am wondering how this would work with trigger based audits which use IF UPDATED()...
>
>BOb
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform