Sybase JDBC Driver does not allow use of setAutoCommit !
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sandeep_Shilawat
Posted On:   Wednesday, May 7, 2003 06:41 AM

Does anybody know how to control Database transactions using Sybase JDBC drivers? I was setting autocommit to false and the commiting or rolling back as per my need. This what I got !!! com.sybase.jdbc2.jdbc.SybSQLException: SET CHAINED command not allowed within mu lti-statement transaction. at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2636) at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1996) at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69) at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:204) at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:187) at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:   More>>

Does anybody know how to control Database transactions using Sybase JDBC drivers?


I was setting autocommit to false and the commiting or rolling back as per my need. This what I got !!!


com.sybase.jdbc2.jdbc.SybSQLException: SET CHAINED command not allowed within mu
lti-statement transaction.

at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2636)
at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1996)
at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:204)
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:187)
at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1616)

at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate(SybStatement.java:15
99)
at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate(SybPreparedS
tatement.java:89)
at com.sybase.jdbc2.tds.Tds.setOption(Tds.java:1111)
at com.sybase.jdbc2.jdbc.SybConnection.setAutoCommit(SybConnection.java:
626)
at weblogic.jdbc.jts.Connection.setAutoCommit(Connection.java:204)
at weblogic.jdbc.rmi.internal.ConnectionImpl.setAutoCommit(ConnectionImp
l.java:161)
at weblogic.jdbc.rmi.SerialConnection.setAutoCommit(SerialConnection.jav
a:133)
at com.fanniemae.fapt.libra.data.floatm.ScenarioDAO.saveScenario(Scenari
oDAO.java:215)
at com.fanniemae.fapt.libra.business.floatm.FloatScenarioManagerBean.sav
eScenario(FloatScenarioManagerBean.java:56)
at com.fanniemae.fapt.libra.business.floatm.FloatScenarioManagerBean_war
edg_EOImpl.saveScenario(FloatScenarioManagerBean_waredg_EOImpl.java:338)
at java.lang.reflect.Method.invoke(Native Method)
at com.fanniemae.fapt.libra.web.CommandServlet.service(CommandServlet.ja
va:59)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2546)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2260)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
java.lang.reflect.InvocationTargetException: com.fanniemae.fapt.libra.business.f
loatm.SaveFailedException
at com.fanniemae.fapt.libra.business.floatm.FloatScenarioManagerBean.sav
eScenario(FloatScenarioManagerBean.java:58)

   <<Less

Re: Sybase JDBC Driver does not allow use of setAutoCommit !

Posted By:   Simon_Ablett  
Posted On:   Wednesday, May 7, 2003 06:46 AM

What was the actual SQL you were trying to execute?

Regards.
About | Sitemap | Contact