This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I'm using Oracle+Weblogic+JBuilder, I got a very strange problem. When I use PreparedStatement to pass parameters to query data, I cannot get the data, it always throws ObjectNotFoundException. But if I use Statement to query data, it works. for example. //Policy: a table in Oracle Database String sql = "select * from policy where id='"+this.id+"'"; st.executeQuery(sql); //this works //but for this String sql = "select * from policy where id=?"; PreparedStatement ps = con.createPreparedStatement(sql); ps.setString(this.id); ps.executeQuery(); //it throws ObjectNotFoundException any help would be appreciated! thanx in advance