rajasekar_1 Posted March 12, 2019 Share Posted March 12, 2019 I tried followed syntax in jasper studio (Note Parameter Class is 'java.lang.String')SP_Name $P(Parameter)and also triedSP_Name $P!(Parameter)and I have a stored procedure like by followingALTER 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 argumentsor> 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 More sharing options...
reportdev Posted March 12, 2019 Share Posted March 12, 2019 It looks like you dont have a OUT parameter for Jasper to iterate through as a resultset.But in order to call the procedure, you need something like thisCall procedure_name ($P{parm1},"$P!{parm2}"); Link to comment Share on other sites More sharing options...
rajasekar_1 Posted March 12, 2019 Author Share Posted March 12, 2019 Hi the above scenario throw the same error... Link to comment Share on other sites More sharing options...
Friendly User Posted March 14, 2019 Share Posted March 14, 2019 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now