I would like a suggestion, then usually I load data on the database in this way:
PreparedStatement prep = con.prepareStatement ("INSERT INTO TABLE (NAME, LAST NAME) VALUES (?,?)");
prep.setString (1, name);
prep.setString (2, last name);
prep.executeUpdate ();
I would like a way to avoid indicate a data reference index, that is, I would like to send data to the PreparedStatement untidily no index, I would like to send the data and then it will be the API to set the correct fields, it could use something like this (note that I reversed the surname with the name, sending the last name first, and the API should add it to the second field )
PreparedStatement prep = con.prepareStatement ("INSERT INTO TABLE (NAME, LAST NAME) VALUES (?,?)");
prep.setString (surname, name);
prep.setString (NAME, name);
prep.executeUpdate ();