public class DemoDriver { public static void main(String[] args) { try { // load the driver into memory Class.forName("org.relique.jdbc.csv.CsvDriver");
// create a connection. The first command line parameter is assumed to // be the Directory in which the .csv files are held Connection conn = DriverManager.getConnection("jdbc:relique:csv:" + args[0] );
// create a Statement object to execute the query with Statement stmt = conn.createStatement();
// Select the ID and NAME columns from sample.csv ResultSet results = stmt.executeQuery("SELECT ID,NAME FROM sample");