When I create a stored procedure, I use
SET NOCOUNT ON
as this speeds up execution time. From this question, SET NOCOUNT ON usage, using SqlDataAdapter
relies upon the rows affected value to be returned. I was wondering if you work with an alternative class that works well for:-
- IF EXISTS to avoid duplicates (no rows affected message)
- Note: use with caution
WHERE NOT EXISTS
(less rows then expected filter out trivial updates (eg no data actually changes) - Do any table access before (such as logging) Hide complexity or denormlisation
- etc