ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gareth Davies" <gr...@sitemaker.cc>
Subject RE: ant sql task with keepformat
Date Thu, 18 Sep 2008 09:33:48 GMT
We found the problem.  The parser chokes if there are any spaces after
the delimiter and there was a "go " on one line.  Grr...

-----Original Message-----
From: Gareth Davies 
Sent: 16 September 2008 16:35
To: user@ant.apache.org
Subject: ant sql task with keepformat

I'm trying to use ant's sql task to execute scripts on a Sybase ASE
12.5.1 database.  I thought everything was working but realized that
without the 'keepformat' attribute set my SQL files are being munged
(lined endings and comments being stripped) which means stored procs are
being munged on creation.

 

The trouble is, when I set keepformat this seems to be incompatible with
the delimeter and delimitertype attributes: delimiters are ignored and
the whole file is sent through.  I get the following error:

com.sybase.jdbc3.jdbc.SybSQLException: Incorrect syntax near 'go'.

 

I've searched the archives and past mails seem to indicate setting the
escapeprocessing might help but it doesn't.  I've tried changing the
delimiter.

 

Example sql task below.  Any workunit.sql in the file list below
containing a 'go' causes the above error.  Any help much appreciated.
Thanks

 

Gareth

       <sql

           driver="${db.driver}"

           url="${db.url}"

           userid="${db.user}"

           password="${db.password}" 

            classpath="${db.classpath}"

            append="true"

            caching="on"

            delimiter="go"

            delimitertype="row"

            print="true"

              autocommit="true"

              keepformat="true"

              escapeprocessing="true"

              >

              

                     select @@servername

                     go

              <path>               

                  <filelist dir=".">

                     <file name="workunit1.sql" />

                     <file name="workunit1.sql "/>

                  </filelist>

              </path>

       </sql>


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


Mime
View raw message