-
newline character in PreparedStatement doesn't recognized with jcc driver?
Hello.
db2 v8.1.2, Windows 2003 Server.
Next code:
--- cut ---
try {
Class.forName("com.ibm.db2.jcc.DB2Driver");
Connection conn =
DriverManager.getConnection("jdbc:db2://:50000/", , );
PreparedStatement pst = conn.prepareStatement("select count(1)\nfrom
syscat.tables\nwhere tabschema=?");
pst.setString(1, "SYSIBM");
ResultSet rs = pst.executeQuery();
if (rs.next()) System.out.println(rs.getInt(1));
} catch (SQLException e) {
e.printStackTrace();
}
--- cut ---
throws Exception:
--- cut ---
com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -7, SQLSTATE: 42601,
SQLERRMC:
;select count(1)
at com.ibm.db2.jcc.c.cl.e(cl.java:1213)
....
--- cut ---
This piece of code has been working fine with app, net drivers on db2 v6.1,
7.2
Is this a feature of the jcc driver?
Best regards, Barinstein Mark.
-
Re: newline character in PreparedStatement doesn't recognized with jcc driver?
Don't quote me on that one, but I think I saw this before and teh conclusion
was that thsi is a behavior of the driver. Don't recall whether it was "as
designed" or a bug though.
Cheers
Serge
-
Re: newline character in PreparedStatement doesn't recognized with jcc driver?
Don't quote me on that one, but I think I saw this before and teh conclusion
was that thsi is a behavior of the driver. Don't recall whether it was "as
designed" or a bug though.
Cheers
Serge