今天在项目测试中出现这个异常,究其原因是
rs = pstam.executeQuery("select count(*) counts from EF_FLOWPACKAGE_REWARD");
pstam是一个preparedStatement,不能这么用。因为它要求要绑定变量。
在oracle jdbc中,得定义一个新的statement
Statement stmt = conn.createStatement();
rs = stmt.executeQuery("select count(*) counts from EF_FLOWPACKAGE_REWARD");