Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parent & Child
Message
From
09/08/2002 13:45:00
 
 
To
09/08/2002 13:21:58
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Miscellaneous
Thread ID:
00686093
Message ID:
00688094
Views:
34
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform