Hi all
i am getting the below error in my try catch block
Try
If para_name.Count = para_val.Count Then
cmd = New SqlCommand(sp_name, cn)
cmd.CommandType = CommandType.StoredProcedure
For i = 0 To para_name.Count - 1
cmd.Parameters.AddWithValue(para_name(i), para_val(i))
Next
cmd.ExecuteNonQuery()
Else
MsgBox("Fill All Parameter....")
End If
Catch ex As Exception
End Try
Error converting data type nvarchar to decimal.
i don't have any column with datatype nvarchar..please tell me what is the problem..
below is the SP wrote for it:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[Add_salary]
(
@month_no varchar (50),
@s_year int ,
@emp_code int ,
@basic numeric(18, 0),
@da numeric(18, 0),
@hra numeric(18, 0),
@ca numeric(18, 0),
@bp numeric(18, 0),
@outfit numeric(18, 0),
@bonus numeric(18, 0),
@overseas numeric(18, 0),
@gross numeric(18, 0),
@tot_ded numeric(18, 0),
@netsal numeric(18, 0),
@remark varchar(50)
)
AS
insert into Salary (month_no,s_year,emp_code,basic,da,hra ,ca,bp,outfit,bonus,overseas,gross,tot_ded,netsal,remark)
values (@month_no,@s_year,@emp_code,@basic,@da,@hra ,@ca,@bp,@outfit,@bonus,@overseas,@gross,@tot_ded,@netsal,@remark)
RETURN