db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendle...@amberpoint.com>
Subject Re: Executing command from a file via JDBC
Date Thu, 10 May 2007 19:58:03 GMT
> I didn't want to distribute derbytools.jar with my application.  I guess 
> was looking for something that came with the core jdbc driver.

You could put something together yourself pretty easily:

   BufferedReader rdr = ...;
   String sql;
   Statement stmt = conn.createStatement();

   while ( (sql = rdr.readLine()) != null)
      stmt.executeUpdate(sql);

Would that serve your purposes?

thanks,

bryan


Mime
View raw message