cancel
Showing results for 
Search instead for 
Did you mean: 

error when call sql server stored procedure

former_member745782
Active Participant
0 Kudos

hello everybody,

I'm working with MII 14 and I want call a SqlServer stored procedure provided from my customer.

I configured a FixedQuery like this:

[dbo].[spElencoEntrateUscite_AV] @delta = 0, @daquando='130101', @CompanyID='000002', @Elenco = @MyCursor OUTPUT

but when i test the query i have back the error:

com.microsoft.sqlserver.jdbc.SQLServerException: Must declare the scalar variable "@MyCursor".

I tried also to set the query like this:

[dbo].[spElencoEntrateUscite_AV]

and pass Parameters:

0

130101

000002

OUTPUT

but i have this error:

com.microsoft.sqlserver.jdbc.SQLServerException: Procedure or function 'spElencoEntrateUscite_AV' expects parameter '@Elenco', which was not supplied.

Any suggestion?

thanks in advance

Alex

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Pederiva,

Did you solve the problem? I am facing the Same.

former_member745782
Active Participant
0 Kudos

hello Kuldeep!

yes i solved.

I used fixed query in MII and declared the cursor:

example:

DECLARE @MyCursor CURSOR

EXEC [dbo].[spElencoEntrateUscite_AV] @delta = 0,@daquando='[Param.1]', @CompanyID='[Param.2]', @Elenco = @MyCursor OUTPUT

I hope this may help u

Alessandro