ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rizwan Merchant" <riz...@alpha-it.com>
Subject passing parameter to sql task
Date Wed, 24 Aug 2005 19:55:47 GMT
 

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.

  


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message