JAVA调用SYBASE过程报过程模式不对的处理
来源:互联网 发布:关于网络利弊英语 编辑:程序博客网 时间:2024/05/21 07:07
通过JAVA、JDBC驱动为JTDS1.2调用SYBASE12.5存储过程的时候,老是报该过程只允许在"Unchained"模式下运,通过命令sp_procxmode查看的时候,该过程也是"Unchained"模式,Hibernate报运行命令"set chained off"即可将当前库的存储过程运行模式改为"Unchianed",但执行后也不行;后面在一个国外的网站查到,将其运行模式改为"anymode"即可,采用命令:sp_procxmode 过程名 'anymode' ,但要修改所有与该过程相关的,被该过程调用的模式都为"anymode"才行,据说只有Sybase有这个毛病,其它的数据库都没有这个问题。
注:chained和Unchained的分别简单的说,就是chained会自动起事务;Unchained不会自动启事务,需要用户显性的用begin tran..commit/rollback去定义。下面是英文说明:
Adaptive Server provides SQL standard-compliant “chained” transaction behavior as an option. In chained mode,all data retrieval and modification commands (delete,insert,open,fetch,select,and update) implicitly begin a transaction. Since such behavior is incompatible with many Transact- SQL applications,Transact-SQL style (or “unchained”) transactions remain the default.
举个例子
In chained transaction mode,Adaptive Server implicitly executes a begin transaction statement just before the following data retrieval or modification statements: delete,insert,open,fetch,select,and update. For example,the following group of statements produce different results,depending on which mode you use: insert into publishers values ("9906",null,null,null) begin transaction delete from publishers where pub_id = "9906" rollback transaction In unchained transaction mode,the rollback affects only the delete statement,so publishers still contains the inserted row. In chained mode,the insert statement implicitly begins a transaction,and the rollback affects all statements up to the beginning of that transaction,including the insert.
本文出自:冯立彬的博客
- JAVA调用SYBASE过程报过程模式不对的处理
- 开发过程中的报java版本不对的问题
- sybase存储过程的写法以及java的调用方法
- sybase存储过程的写法以及java的调用方法
- ODBC调用sybase的存储过程
- ODBC调用sybase的存储过程
- c#调用sybase存储过程
- c#调用sybase存储过程
- Sybase存储过程报transaction mode错误
- 系统调用的处理过程
- Java调用MySQL存储过程报错
- java调用存储过程报诡异异常
- c#调用sybase存储过程(ODBC)
- c#调用sybase存储过程odbc
- Sybase调用存储过程并返回结果
- Sybase存储过程的使用
- java调用存储过程 中DATE参数的处理
- java方法调用过程解析和执行--编译器的处理
- GDI与CDC
- JDK 和JRE的区别
- Oracle 9i闪回查询(Flashback Query)
- 如何在ASP.NET中发送电子邮件?
- vi 查找关键字时忽略大小写
- JAVA调用SYBASE过程报过程模式不对的处理
- Visual C#实现网络对时系统——UDP协议的实际应用
- table和div的优缺点
- CreateProcess by modify the struct STARTUPINFO, sth you must be careful!!
- 结构对齐
- Document root must be a directory
- mysql 最简单的存储过程例子
- MANIFEST.MF文件的格式
- 最基本的Socket编程 C#版