DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18930>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18930

SQLExec Task does not work well with MS SQL Server

           Summary: SQLExec Task does not work well with MS SQL Server
           Product: Ant
           Version: 1.5.3
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Core tasks
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


There are a number of problems with using the SQLExec task Ant 1.5.3

1)the delimiter test is case-sensitive. It's difficult to control whether a 
delimiter is entered as go, Go or GO. This can be addressed easily in Ant by 
changing .equals in line 469 to .equalsIgnoreCase.

2)The batch is submitted with all line breaks removed. My main use for SQLExec 
is loading stored procedures. If I use SQLExec as is then the db's version of 
the sproc has no linefeeds. This makes it difficult to view the file when, on 
occasion, I want to compare the current db version of the sproc with a local 
version. This can be addressed easily by replacing line 454 with:
 sql += "\n" + line;

I don't believe any statements should suffer from this since all you this 
actually does is restore the line breaks that were in the source.

If you make that change then the lines 457 through 462 become redundant.

Reply via email to