ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric VanLydegraf <er...@kinzan.com>
Subject RE: [PATCH] Print SQL to System.out or output file
Date Fri, 22 Sep 2000 18:56:45 GMT
Here Here ! I Like the classpath idea - yet one more classpath I can build
into the ant build.xml instead of requiring it in the actuall user
environment CLASSPATH.

-----Original Message-----
From: Tomasini Andrea [mailto:andrea.tomasini@nch.it]
Sent: Friday, September 22, 2000 3:22 AM
To: ant-dev@jakarta.apache.org
Subject: R: [PATCH] Print SQL to System.out or output file



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