ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sekar, Sowmya" <sse...@ucsd.edu>
Subject DDL support from Ibatis
Date Tue, 28 Oct 2008 22:37:19 GMT
Hi,
I am trying to rename a table from ibatis.
                Try{
            String resource = "sql-map-config.xml";
            Reader reader = Resources.getResourceAsReader(resource);
            sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader);
            reader.close();
 
            sqlMap.update("table", null);
            sqlMap.startTransaction();
//code here
            sqlMap.commitTransaction();
      }
Catch(Exception e)
{
}
Finally{
      sqlMap.endTransaction();
}
 
Sql-map-config.xml :
EXEC sp_rename old_table, new_table
 
When I Execute this piece, it throws an exception :
 
--- Cause: com.sybase.jdbc2.jdbc.SybSQLException: Can't run sp_rename
from within a transaction.
 
What could be the problem?
Is DDL supported by Ibatis or not?
Sowmya Sekar
 

Mime
View raw message