Error executing Stored procedure

Hello.

I was running a stored procedure to insert data in a table. I've made some to perfom some tasks and no problem at all.
I checked the paramets that went on the request to the sql server and they are all there...
I'm getting this error : SqlException: Must declare the scalar variable "@qtt_enc". I've ran this stored procedure on sql server with the same parametes and runs like a charm.

In which place can be the problem?

Thsnk you

Not sure what is causing this problem however you can try to run the same SQL (from ExecuteSqlCommand) in SQL Server Management Studio to see what will be the result.

Hello I have another problem related with stored procedures. I have this stored procedure to get a value from the database. If I make a bind to a database everything is fine.
I wanted to use the result on another type of component like a heading or a gauge .

This is the procedure:

alter procedure verifica_percentagem @id_tecnico int, @mes int, @ano int
as

declare @mes_calculo varchar(2)
declare @ano_calculo varchar(4)
declare @ultimo_dia date
declare @primeiro_dia date
select @mes_calculo = CONVERT(varchar(2), @mes)
select @ano_calculo = CONVERT(varchar(4), @ano)


select @ultimo_dia = EOMONTH(convert(char(4), @ano_calculo)+'-'+@mes_calculo +'-01')
select @primeiro_dia = convert(date, DATEADD(m, DATEDIFF(m, 0, @ultimo_dia), 0), 120)

select convert(int, round(sum((qtt*tempo_previsto)*perc_produtividade)/SUM(qtt*tempo_previsto), 0)) as percentagem from registo_produtividade (NOLOCK) 
where data_operacao >= @primeiro_dia and data_operacao <= @ultimo_dia and registo_produtividade.tempo_executado <> 0 and id_tecnico = @id_tecnico

On the webpage I call the stored procedure and I can get the value and use it on a datagrid.
Here is the network event

Am I doing something wrong?

Thanks you.
kind regards

The value property of the result is an array. You will have to use an item from it with a component that expects a single value such as a Gauge: ${result.value[0].percentagem}