我试图使用jaydebeapi将数据从本地derby数据库导入python。我正在PyCharmCE上运行python 3.6:
import jaydebeapi as jdbc
conn = jdbc.connect("org.apache.derby.jdbc.ClientDriver", "jdbc:derby://address:port/db_name", ["user", "pwd"], "path/to/derbyclient-10.14.2.jar")
curs = conn.cursor()
curs.execute("select ITEM from TABLENAME")
rec = curs.fetchone()[0]
curs.execute("select BLOB from TABLENAME")
rec = curs.fetchone()[0]
curs.close()
conn.close()
虽然第一次查询一切顺利,但我在处理数据块时遇到了问题。我收到以下运行时错误:
Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
blob数据大小约为200kB。在运行时,rec变量的类型为org.apache.derby.client.am.ClientBlob-发现有点令人费解…不知道它是否有助于解决方案
任何提示,请提前发送Thx
这似乎是an issue of JPype 0.7.5(可能是之前)。这可能在即将发布的0.7.6中得到修复
如果您还没有使用JayDeBeApi 1.2.3,那么也值得一试
相关问题 更多 >
编程相关推荐