0
用下面的代码我得到java.lang.RuntimeException: Connection failed :ORA-00900: invalid SQL statement
。首先查询被执行,但后来者不要。Java的多个查询不执行
代码:
Connection conn = Pool.getConnection();
logWithTimestamp("Connection Established" +conn);
Statement stmt = null;
String [] queries = createQuery.split("#");
for(String q :queries){
logWithTimestamp("Executing query " +q);
stmt =conn.createStatement();
stmt.execute(q);
stmt.close();
}
conn.close();
什么想法?
你肯定没有这是不坏的SQL语法编写的任何要求吗?你能打印出日志吗? – Maxime
您希望我们告诉您您没有向我们显示的SQL语句有什么问题? –