When you call setString you pass in two arguments, the first is the index of the parameter you are filling in and the second is the value you are filling it with. In your case, you would want prepareStatement.setString(1,name); to fill in the 1st parameter, prepareStatement.setString(2,case); to fill in the 2nd parameter, and so on.