Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Pramod Sargar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Pramod Sargar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic