ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomasini Andrea" <andrea.tomas...@nch.it>
Subject R: [PATCH] Print SQL to System.out or output file
Date Fri, 22 Sep 2000 10:21:46 GMT
  Here's a patch to to the SQLExec.java which adds the
ability to pipe the results of SQL statements executed with
<sql/> to a file or the screen. It simply prints the output
as comma delimited values, optionally printing the headers.
I wrote it thinking of using it to write queries which
generate sql statements which can then be fed back into
<sql/> directive a second time.

  Here is sample usage:

                  <sql
                          driver="${db.driver}"
                          url="${db.url}"
                          userid="${db.userid}"
                          password="${db.password}"
                          print="yes"
                          showheaders="no"
                          output="output.txt">
                  select count(*) from footable
                  </sql>

  Very Good!! What about adding a classpath attribute to
locate multiple JDBC Drivers??

  Byez
  ANdreaT

Mime
View raw message