posted 21 years ago
There are many things wrong when you evaluate what is actually being executed, but it all comes down to the fact that you are abusing the prepared statement. Prepared statements are to be used if you are repeatedly using the same SQL statement, except only the parameter values are changing in the where clause (which are represented by a ? ). You need to use a Statement object to accomplish your goal, or prepareStatement() for each different query.
Solution 1
Solution2
OR something similar to this.
Jamie