Execute a sql command outside a mult-statement transaction??
Posted on 2005-02-25
I am having some problems dropping and creating a temp database table from my java code. I get an error telling me that it is not allowed:
java.sql.SQLException: [BEA][Sybase JDBC Driver][Sybase]The 'DROP TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database.
I found documentation online saying that I have to turn ddl in transaction on, however the dba's do not advise me to do so. I then read that I have two other options.
1.) Use a permanent object name and not use tempdb
2.) Execute the command outside a multi-statement transaction
As the first option is not ok, is there a way I can execute a command outside a multi-statement transaction in java?
Thanks for your help!