set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[STPEditPersonAccountByGrid] @Introducer nvarchar(1000), @Comment nvarchar(1000), @VisitorPer real, @AccountSysCode int , @Title nvarchar(1000), @SecurLevelId int, @CreditLimit money, @SalePriceNoId int, @GroupId1 int, @GroupId2 int AS begin tran UPDATE PersonTbl SET Comment = @Comment, VisitorPer = @VisitorPer, Introducer = @Introducer, GroupId1 =@GroupId1, GroupId2 =@GroupId2, SalePriceNo =@SalePriceNoId WHERE (FK_AccountSysCode = @AccountSysCode) UPDATE CodeMNGDWNTbl SET Title = @Title, SecurLevel = @SecurLevelId, CreditLimit = @CreditLimit WHERE (AccountSysCode = @AccountSysCode) if @@error=0 commit else rollback