@ Parameter1 is not a parameter for the procedure

ALTER PROCEDURE [dbo].[NST_InsertTblGenLedDet] @GHDHeader int, @Gldtype text, @GldAccount text, @GldDate DateTime, @GldVoucherType int, @GldDebit float=null, @GldCredit float= null, @GldDtaLine int= null AS DECLARE @ERR INT BEGIN TRANSACTION Insert into [TblGenLedDet] (GHDHeader,Gldtype,GldAccount,GldDate, GldVoucherType, GldDebit,GldCredit,GldDtaLine) values (@GHDHeader,@Gldtype,@GldAccount,@GldDate, @GldVoucherType, @GldDebit,@GldCredit,@GldDtaLine) SET @ERR = @@Error IF @ERR = 0 BEGIN COMMIT TRANSACTION END ELSE BEGIN ROLLBACK TRANSACTION RETURN @ERR END 

enter image description here

I get this error again and again, although I specified the parameter name as @GldCredit, it shows the parameter name as parameter

+4
source share
2 answers

In your code, you initialize gldCredit , but then update gldDebit . Your gldCredit parameter never has any of its elements, and thus has ParaameterName defautled to "@Paremeter1" .

It looks like you copied / pasted the gldDebit code to configure your parameter, but forgot to update all the links in the new code block to point to gldCredit .

+9
source

Exchange for future readers -

This error also occurs when @ParameterName in C# code is different from @Parameter_Name in stored-procedures .

0
source

Source: https://habr.com/ru/post/1439214/


All Articles