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

Sybase datasource: problem with temp table in stored proc


ntjp

Recommended Posts

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 #MYRESULTS

DROP TABLE #MYRESULTS

END


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)

 

Regards

kb

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...