ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William.R.Zwi...@erdc.usace.army.mil
Subject RE: <SQL> can't execute a ${property}?
Date Sat, 01 Nov 2003 04:59:37 GMT
No dice.  Here is the exact task I'm running:

    <property name="testql" value="DROP TABLE countydata; DROP TABLE
airport;"/>

    <sql
      driver="${driver}"
      url="jdbc:mysql://${jdbc.server}/${jdbc.database}"
      userid="${mysql.ff.user}"
      password="${mysql.ff.passwd}"
      onerror="continue"
      keepformat="true">
      <classpath
path="../../lib/mysql-connector-java-3.0.8-stable-bin.jar"/>
${testql}
    </sql>

And the output:

      [sql] Executing commands
      [sql] Failed to execute:
      [sql] DROP TABLE countydata; DROP TABLE airport
      [sql] java.sql.SQLException: Syntax error or access violation,
message from server: "You have
 an error in your SQL syntax near '; DROP TABLE airport' at line 2"
      [sql] 0 of 1 SQL statements executed successfully

I get the same error if I copy put the query string itself inside the <sql>
task; but if I follow the first semicolon with a newline, it works fine.  So
*something* doesn't like multiple commands on the same line.  But what?
Who's parsing the SQL before it goes to MySQL?  And why does sourcing from a
file work fine?

-Bill

// William R. Zwicky
// USA-CERL  (217) 352-6511 x7405
// Champaign, IL



> -----Original Message-----
> From: W. Sean Hennessy [mailto:shennessy@goldenhourdata.com] 
> Sent: Thursday, October 30, 2003 10:35 AM
> To: 'Ant Users List'
> Subject: RE: <SQL> can't execute a ${property}?
> 
> <interesting suggestions>

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