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
|