Here you can find the source of execSql(String sql, Connection conn)
public static boolean execSql(String sql, Connection conn) throws Exception
//package com.java2s; import java.sql.Connection; import java.sql.PreparedStatement; public class Main { public static boolean execSql(String sql, Connection conn) throws Exception { PreparedStatement ps = conn.prepareStatement(sql); boolean result = false; try {/* w w w . j av a2s.c o m*/ ps.execute(); } finally { ps.close(); } return result; } }