Home > Database > Mysql Tutorial > Java中查询db2的clob列的问题

Java中查询db2的clob列的问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 17:01:24
Original
1970 people have browsed it

在java中使用下面代码查询db2的clob列(conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY))

在java中使用下面代码查询db2的clob列

(conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY)).executeQuery(sql)
时会报以下错误:

DB2 SQL error: SQLCODE: -270, SQLSTATE: 42997, SQLERRMC: 63

而sql语句在db2中直接执行是不会报错的。

在db2中直接执行是没有使用scrollable cursor游标的,,那解决的方法既是:

将createStatement中的参数去掉,直接用下面的代码:

createStatement().executeQuery(sql)

这样就可以了,不会报错的了

linux

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Install JAVA
From 1970-01-01 08:00:00
0
0
0
Unable to install java
From 1970-01-01 08:00:00
0
0
0
Can java be used as the backend of the web?
From 1970-01-01 08:00:00
0
0
0
Is this in Java language?
From 1970-01-01 08:00:00
0
0
0
Help: JAVA encrypted data PHP decryption
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template