Error1:无法在手动或分布事务下创建新的连接
此问题一般是使用原生Connection获取RecordSet进行数据处理时导致的,原因是Connection的Execute方法
返回的RecordSet默认的属性一般是只读的。The returned
Recordset object is always a read-only, forward-only
cursor. If you need a
Recordset object with more functionality, first create a
Recordset object with the desired property settings, then use the
Recordset object's
Open method to execute the query and return the desired cursor type.
这样,在事务状态下的数据处理就可能出现这个错误。
解决方法:如果不是在Server端执行的语法,应该是用adUseClient属性
Error2:
ITransactioin::Commit或ITransaction::Abort调用,并且对象处于zombie状态
此问题也是由于RecordSet的属性设置不当导致的。一般将CursorType设为adUseClient即可解决
转载于:https://www.cnblogs.com/Phoenix-Rock/archive/2006/12/28/605745.html