You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Rizwan Merchant <ri...@alpha-it.com> on 2005/08/24 21:55:47 UTC
passing parameter to sql task
Hi,
I am trying to run the sql task on a file using the src attribute of the
task (as follows)
<target name="cleanDB" depends="init" description="Clears the database ">
<sql
driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
url="jdbc:microsoft:sqlserver://localhost\myinstance:1433;DatabaseName=on_de
velop"
userid="sa"
password="on_develop"
src="cleanDB.sql"
/>
</target>
Is there any way I can generalize the above script to delete *ANY* database
on the server by sending a parameter to the cleanDB.sql file? So basically,
instead of specifying the database name using "DatabaseName=on_develop", I
would like to send to my sql script the name of the database to work with.
Any ideas?
Thanks,
-Rizwan.