Java SQL Execute execute(Connection conn, String SQL)

Here you can find the source of execute(Connection conn, String SQL)

Description

execute

License

Open Source License

Declaration

public static void execute(Connection conn, String SQL) throws Exception 

Method Source Code


//package com.java2s;
import java.sql.Connection;

import java.sql.Statement;

public class Main {
    public static void execute(Connection conn, String SQL) throws Exception {
        Statement stmt = conn.createStatement();
        try {//  ww  w  .  j  av a2 s.  co  m
            stmt.execute(SQL.toString());
        } catch (Exception ex) {
            System.out.println("Exception running SQL: " + SQL.toString());
            throw ex;
        }
    }
}

Related

  1. exec(Connection conn, String sql)
  2. exec(Connection psql, String sql)
  3. execSql(String sql, Connection conn)
  4. execStatement(Connection con, String strStatement)
  5. execte(Connection conn, String sql)
  6. execute(Connection conn, String sql, Object[] args)
  7. execute(Connection conn, String sql, Object[] params)
  8. execute(Connection conn, String string)
  9. execute(Connection connection, String sql)