ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 26459] - SQL task (SQLExec class) might not see a ROW delimiter correctly
Date Wed, 28 Jan 2004 08:05:26 GMT
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=26459>.
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=26459

SQL task (SQLExec class) might not see a ROW delimiter correctly





------- Additional Comments From matthieu.recouly@laposte.net  2004-01-28 08:05 -------
Hi Robert,

The above example is to illustrate description of the problem, in fact I
encountered three problems when I tried to load several SQL scripts against a
MS-SQL server database:

1/ In those scripts were written comments like the following:

/* Section title
-----------------*/
Some statements
GO

Without the 'keepformat' option set to 'true', the second line (several dashes +
'*/') was ignored since ANT SQL task considers a line starting with '--' is a
comment, and must be dropped. This made the first line (where comment starts) to
be sent, and an error to occur since end of comment was not received by the
server. That's why I was forced to set the 'keepformat' to true.


2/ Let's assume we set our 'delimiter' option the value 'GO', and we have the
following SQL code in a script

PRINT 'YOU SHOULD GO
THERE'

This runs correctly with query analyzers coming with MS-SQL server, but without
setting the 'delimiterType' option to 'row' in ANT SQL task, this will cause the
text previous to "GO" to be sent as a query. That's why setting 'delimiterType'
to 'row' is needed.


3/ In some of the scripts I run, I found the delimiter written using both upper
and lower case ('GO'/'go'), or with one or more spaces behind, which is the
problem I described above...


Currently, I am working in a large company, where people from database
department are used to MS tools which allow these practices. I wish they were
able to use ANT instead of MS based tools to run their scripts against a DB,
that's why I am suggesting those changes, which look useful to me.

Note that I AM NOT asking that ANT SQL task become more like MS tools, I am just
querying for more compatibility on precise points...
If this ever comes to break the original mind of the code ANT developers write,
I will use the ANT way of handling such case and continue using the customized
ANT task I did write for that.


Cheers !


Matthieu Recouly

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


Mime
View raw message