« Return to Thread: Executing command from a file via JDBC

Re: Executing command from a file via JDBC

by Bryan Pendleton :: Rate this Message:

Reply to Author | View in Thread

> 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

 « Return to Thread: Executing command from a file via JDBC