Jump to content
We've recently updated our Privacy Statement, available here ×

Calling MS Sql Stored Procedure from jasper studio


rajasekar_1

Recommended Posts

I tried followed syntax in jasper studio (Note Parameter Class is 'java.lang.String')

SP_Name $P(Parameter)

and also tried

SP_Name $P!(Parameter)

and I have a stored procedure like by following

ALTER Procedure [dbo].[sP_Name ]    @Parameter varchar(50)        As    Begin        select * from tablename where id IN (@Parameter)        end[/code]

while trying the above scenario i got the following error in jasper studio

> procedure have too many arguments

or

> Conversion failed when converting the varchar value '1,2' to data type
> int.

please provide a proper solution for this..
Thanks in advance...

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

As previous poster indicated, the procedure is invoked using "call <stored_proc_name>(<arguments>)". I'd suggest first to try to simplify the query, remove the parameters and see if that runs successfully for you. Then add the parameter. It seems there is an error here in executing the SQL statement, I am not sure what value you pass with the parameter.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...