BOb,
Hmmm ... I suspect you're right about the UPDATED(MyField2) returning a true in this casel, however I don't know that for a fact ... just a SWAG. I guess this wouldn't work too well if you're auditing column changes. We plan on auditing only row changes, so we aren't too concerned.
~~Bonnie
>>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