Java SQL PreparedStatement setValues(PreparedStatement statement, Object[] values)

Here you can find the source of setValues(PreparedStatement statement, Object[] values)

Description

set Values

License

Apache License

Declaration

public static void setValues(PreparedStatement statement, Object[] values) throws SQLException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.sql.PreparedStatement;
import java.sql.SQLException;

public class Main {
    public static void setValues(PreparedStatement statement, Object[] values) throws SQLException {
        for (int i = 0; i < values.length; i++) {
            statement.setObject(i + 1, values[i]);
        }/*from   w  w w  .j  a  v  a 2s.c  om*/
    }
}

Related

  1. setValue(PreparedStatement ps, int posicion, int tipo, String strDefault, String strValor)
  2. setValueIndex(PreparedStatement stmt, int index, int valueIndex)
  3. setValues(PreparedStatement preparedStatement, Object... values)
  4. setValues(PreparedStatement statement, Object... values)
  5. setValues(PreparedStatement statement, Object... values)
  6. substitute(PreparedStatement stmt, Object[] params)
  7. writeArray(Connection connection, PreparedStatement preparedStatement, int column, Class type, T[] array)
  8. writeList(Connection connection, PreparedStatement preparedStatement, int column, Class type, List list)
  9. writeMap(Connection connection, PreparedStatement preparedStatement, int keyColumn, int valueColumn, Class keyType, Class valueType, Map map)