Firebird:无效的事务句柄(期望显式事务启动)

时间:2016-05-17 06:19:36

标签: python firebird

我关注this官方指南并尝试在我的代码中设置隔离级别,如下所示:

import fdb

cnx = fdb.connect(....)
cursor = cnx.cursor()
cursor.execute("SET TRANSACTION ISOLATION LEVEL READ COMMITTED NO RECORD_VERSION")

但是在控制台中运行此代码会导致出现以下错误消息:

File "<stdin>", line 1, in <module>
File "C:\data\fdb\fdb\fbcore.py", line 3574, in execute
self._ps._execute(parameters)
File "C:\data\fdb\fdb\fbcore.py", line 3291, in _execute
"Error while executing SQL statement:")]
fdb.fbcore.DatabaseError: ('Error while executing SQL statement:\n- SQLCODE: -901\n- 
invalid transaction handle (expecting explicit transaction start)', -901, 335544332)

我不确定这有什么问题,我该如何解决。

0 个答案:

没有答案