Hi John,
Why do you need dynamic SQL in the first place? In general, you should keep triggers as efficient as possible.
>In my trigger, I use dynamic sql to check for record existence in other table before do actual update.
>
>Currently, I am using @@ROWCOUNT to check rows after run the dynamic SQL using EXEC(). However, it affect RecordsAffected property in ADO.NET. I also tried to use "SELECT @row_count = COUNT(*) ... ", but it hit error, seem like @row_count in not accessible in dynamic sql scope.
>
>Any workaround?
>
>Thank you
--sb--