Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parent & Child
Message
From
10/08/2002 11:06:06
 
 
To
09/08/2002 13:45:00
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Miscellaneous
Thread ID:
00686093
Message ID:
00688304
Views:
31
>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 see. Do you know, lets say in the above case you pass @MyField1 a new value but not the other. When the update trigger fires, if you evaluate

IF UPDATED(MyField2)

would it return a 1 (.t.)? (I expect it will, even though you didn't really change the value.) If so, I wonder how this would affect trigger based audits?

Thanks for the info.

BOb

>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform