Java SQL PreparedStatement fillArgs(Object[][] args, PreparedStatement pstmt, int i)

Here you can find the source of fillArgs(Object[][] args, PreparedStatement pstmt, int i)

Description

fill Args

License

Apache License

Declaration

private static void fillArgs(Object[][] args, PreparedStatement pstmt, int i) throws SQLException 

Method Source Code

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

import java.sql.PreparedStatement;

import java.sql.SQLException;

public class Main {

    private static void fillArgs(Object[][] args, PreparedStatement pstmt, int i) throws SQLException {
        if (args == null || args.length == 0)
            return;
        if (args[i] == null || args[i].length == 0)
            return;

        for (int j = 0; j < args[i].length; ++j)
            pstmt.setObject(j + 1, args[i][j]);
    }/*  w w w  .j  a va2  s  .  c o m*/
}

Related

  1. closeStatement(PreparedStatement theStatement)
  2. createInsertPrepareStatement(Connection conn, String tableName, String[] dataColumnNames)
  3. createPreparedStatement(Connection conn, String sql, String[] args)
  4. createProjectInfo(PreparedStatement ps, long projectId, long projectInfoTypeId, String value, long modUserId)
  5. deleteOldData(Connection connection, PreparedStatement stmt, String funcId)
  6. fillInClause(PreparedStatement ps, int startIndex, Collection clauses, int sqlType)
  7. fillParameters(PreparedStatement stmt, List params)
  8. fillPreparedStatementParams(PreparedStatement ps, Object... obj)
  9. fillStatement(PreparedStatement ps,Object...params)

  10. HOME | Copyright © www.java2s.com 2016