今天在項目測試中出現這個異常,究其原因是
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");