ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <anto...@apache.org>
Subject Re: SQL parameter
Date Tue, 17 Feb 2004 22:12:24 GMT
Mario Manfre wrote:

>HI,
>I'm trying to create or drop a database based on a property file.
>
>the basics are
>
> <property name="db.name"        value="Test_DB"/>
>
>
>and then either do
>
>            <exec  executable="osql"
>                  dir="C:\Build\"
>                  failonerror="true"   
>                  vmlauncher="false"
>                  >
>            <arg value='-E'/> 
>            <arg value='-SSQL-SERVER\'/>
>            <arg value='-q"drop database ${db.name}"'/>
>            </exec>
>
>
>      <sql driver="${dbDriver}"
>             classpath="${jdbc}:${jdbc-add1}:${jdbc-add2}"
>             url="${jdbc-connect}"
>             userid="${db.user}"
>             password="${db.user.password}"
>             print="false"
>             >
>             <transaction src="drop database ${db.name}"/>
>             </sql>
>
>Or is there some other way which I am missing?
>
>Thanks,
>Mario
>
>  
>
This sounds good. Pay attention that you might need to escape as &quot; 
the double quotes in the argument -q"drop database ${db.name}",
so write -q&quot;drop database ${db.name}&quot;

Come back to the list if something does not work out properly.

Antoine


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message