I have been looking for sending a list of integer array into prepared statement, but i was unable to do it. can somebody help me do it.
my code as follows:
public int Verify(int[] val) {
try {
if (connection != null) {
pstmt = connection.prepareStatement("select cola from tableA where val in(?)");
pstmt.setInt(1, val);
rs = pstmt.executeQuery();
i know this wont work.can someone help me to send all values in array at one into "?".
Any help could be greatly appreciated.