ntjp Posted January 7, 2013 Share Posted January 7, 2013 I have the following issue: my jrxml report calls a Sybase stored procedure which itself creates (and drops) some temporary table before returning the result dataset.eg: CREATE PROCEDURE mystoredproc BEGIN CREATE TABLE #MYRESULTS(COL1 INT)INSERT INTO #MYRESULTS VALUES(1)SELECT COL1 FROM #MYRESULTSDROP TABLE #MYRESULTSEND the stored procs works fine in ireport but when run from JasperServer, I'm getting the following error: The 'CREATE TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database. It seems like the problem is that the datasource wraps the stored proc call into a transaction. The same problem can be reproduced from a DB front-end tool by explicitely wrapping the stored-proc call within a transaction: begin transaction exec mystoredproc commit transaction Hence my question is: how to prevent in JasperServer the stored proc call of my sybase data-source from being wrapped into a transaction ? Note: I'm using jtds 1.2.7 as database driver and my connection string is plain vanilla (jdbc:jtds:sybase://myserver:myport/mydatabase) Regardskb Link to comment Share on other sites More sharing options...
ntjp Posted January 8, 2013 Author Share Posted January 8, 2013 for whatever reason looks like wrapping the DB connection inside a JNDI pool solves the issue.kb 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