When we issue our INSERT, UPDATE or DELETE statements and we only expect one row to be affected, then we often throw an exception if the rows affected is <> 1. Your trigger is affecting the rowcount returned, so putting SET NOCOUNT ON will stop that.

I also don't think you should be using nvarchar - we use varchar types and if you ever use a JOIN from an nvarchar to a varchar you're going to see a performance hit.

I also am curious why your creditlimit is an nvarchar and your putting in there DB_Main.CreditLimit - which is a DECIMAL(19,6)?

Mike

Mike SheenChief Software EngineerJiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution