ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject <SQL> can't execute a ${property}?
Date Tue, 28 Oct 2003 05:46:49 GMT
I can't get the <sql> task to execute a property, and would appreciate any
help, as this problem is pretty strange.  I'm using:
  Java 1.4.1-b21
  Ant 1.6beta September 30 2003
  mysql  Ver 11.15 Distrib 3.23.41, for Win95/Win98 (i32)
and most importantly:

The task statement is essentially

The property 'somesql' contains 40 DROP TABLE statements.  When I execute
the task as above, I get the error:

      [sql] java.sql.SQLException: Syntax error or access violation,
message from server: "You have an error in your SQL syntax near ';
      [sql] DROP TABLE SIRRAdatainfo;
      [sql] DROP TABLE SIRRAinstall;
      [sql] DROP TABLE SIRRAprox;
      [sql] DROP ' at line 1"

The first DROP statement isn't in the error message, but that line plus the
text quoted in the error is exactly 100 chars.  But wait, it gets weirder.

If I copy these directly into my Ant file thusly:


then the query works fine.  What's going on?  Why does using the property
cause <sql> to misinterpret the query?


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

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