Java tutorial
//package com.java2s; import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; public class Main { /** * DOCUMENT ME! * * @param database * DOCUMENT ME! * @param sql * DOCUMENT ME! * * @throws SQLException * DOCUMENT ME! */ public static void execute(String database, String sql) throws SQLException { Connection c = java.sql.DriverManager.getConnection("jdbc:hsqldb:file:" + database); Statement st = c.createStatement(); st.execute(sql); st.close(); c.close(); } }