ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Mlodzinski" <Adam.Mlodzin...@quest.com>
Subject RE: <SQL> can't execute a ${property}?
Date Mon, 03 Nov 2003 18:30:15 GMT
On November 1, 2003 12:00 AM, William.R.Zwicky@erdc.usace.army.mil
wrote:

> No dice.  Here is the exact task I'm running:
> 
>     <property name="testql" value="DROP TABLE countydata; DROP TABLE
airport;"/>
What if you change this to 
<property name="testql" value="DROP TABLE countydata;
DROP TABLE airport;"/> ?
(mind the newline after the first semi-colon)

> 
>     <sql
        ...
>       keepformat="true">
>       <classpath
path="../../lib/mysql-connector-java-3.0.8-stable-bin.jar"/>
> ${testql}
>     </sql>

and change this to:

     <sql
        ...
       keepformat="true">${testql}
       <classpath
path="../../lib/mysql-connector-java-3.0.8-stable-bin.jar"/>
     </sql>

>       have  an error in your SQL syntax near '; DROP TABLE airport' at
line 2" [sql] 0 of 1 SQL
> statements executed successfully 
It's almost as if the first drop command is read in okay, up until the
first semi-colon. What if you use a different delimiter, specifying the
delimiter attribute of <sql>

Last suggestion: try wrapping the property with <transaction> tags -
maybe if the property text is read by <transaction>, there will be a
difference. I'm grasping though.

> And why does sourcing from a file work fine?
No suggestions for this one, other than if this method works fine, why
not use it? I know, I know...

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


Mime
View raw message