The moose likes JDBC and the fly likes Create Table is not allowed inside transaction Exception while executing syabse procedure Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Create Table is not allowed inside transaction Exception while executing syabse procedure" Watch "Create Table is not allowed inside transaction Exception while executing syabse procedure" New topic
Author

Create Table is not allowed inside transaction Exception while executing syabse procedure

Pramod Sargar
Greenhorn

Joined: Jan 13, 2009
Posts: 2
Hi all,

I have some problem at hand while using "Sybase Procedure".

I am suppose to do something like this:

1) Start a transaction from java code (by means of con.setAutocommit(false))
2) Call X Procedure
3) Call Y Procedure
4) Commit/Rollback Transaction.

Now problem is that Procedure Y was ever been developed, and it is "creating temp. table".
because of which i am getting exception that "Create Table is not allowed inside transaction".

Is anyone came across this problem, and is anyone aware of the solution for this problem.

Note: 1) Using "ddl in tran" to true is not an option for me
2) Above sequence of statement is important.

Your help is greatly appreciated. , If you need more info. i will let you know.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

DDL is not transactional, hence the error. So you can't do what you are trying to do (on any database, not just Sybase).

Perhaps you could explain why you need the temporary table? Maybe there is a way round this.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Pramod Sargar
Greenhorn

Joined: Jan 13, 2009
Posts: 2
Hi Paul,

sorry for late reply.

was really busy with code delivery

anyways DBA just realised that we could write a small procedure to serve our purpose.
and we are no longer using the procedure having temp. tables.

Thanks,
Pramod
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Create Table is not allowed inside transaction Exception while executing syabse procedure
 
Similar Threads
How to update or insert 1 million record to table B based on table A faster?
java.lang.OutOfMemoryError on very long time consuming usecase
Set Chained OFF error while executing from my Bean
Problem retrieving output from stored procedured
Global temporary table