Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parent & Child
Message
De
10/08/2002 11:06:06
 
 
À
09/08/2002 13:45:00
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Divers
Thread ID:
00686093
Message ID:
00688304
Vues:
30
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform