Portlight Posted January 4, 2012 Share Posted January 4, 2012 using mssql 2008I have a stored procedure which i am using to build a report.The procedure works within the query analyzer, is returns the expected data, however when I use this query in a iReport - and try to run the report i get the following error:Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:170) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:392) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:338) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:281) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:222) ... 11 moreI have set NOCOUNT ON;In the stored procedure - any ideas Link to comment Share on other sites More sharing options...
Raphaël Peguet Posted January 4, 2012 Share Posted January 4, 2012 Hi Suki, I'm not very familiar with stored procedures but there is some hints on this page http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=65834 Hope this helps, Raphael Link to comment Share on other sites More sharing options...
fernando2k3 Posted April 12, 2021 Share Posted April 12, 2021 Insert After you Begin in your PL "SET NOCOUNT ON"example:USE [GPEXT]GOCREAT Proc [dbo].[EXAMPLE] @year char(4),@month char(2)ASSET NOCOUNT ONHope this helpsLuis 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