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 21594] - Result Sets and Errors are getting lost in SQL task with multiple statements
Date Wed, 16 Jul 2003 11:31:06 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=21594>.
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=21594

Result Sets and Errors are getting lost in SQL task with multiple statements





------- Additional Comments From antoine@apache.org  2003-07-16 11:31 -------
I have done a test to try to reproduce your issue with ant 1.6alpha and MS SQL 
Server and I am not seeing the behavior that you mentioned (execution continuing 
and ant silently ignoring the problem).

Here are my build file and my output :

$ ant -f sql.xml
Buildfile: sql.xml



sql:

      [sql] Executing commands

      [sql] columna,columnb

      [sql] bonjour,Guten Tag



      [sql] Failed to execute: 

      [sql] INSERT INTO TableA (columna, columnb) VALUES (NULL, NULL)



BUILD FAILED

C:\dev\testant\sql.xml:10: java.sql.SQLException: [DJ0X820J]Cannot insert the 
value NULL into column 'columna', table 'test.test.TableA'; column does not 
allow nulls. INSERT fails.



Total time: 1 second

antoine@DJ0X820J /cygdrive/c/dev/testant 
$ cat sql.xml
<project name="sql" default="sql">
   <target name="sql">
       <sql
    print="true"
    keepformat="true"
    driver="com.inet.tds.TdsDriver"
    url="jdbc:inetdae:localhost:1433"
    userid="test"
    password="test"
    classpath="c:/dev/testant/lib/Opta2000.jar">
 
SELECT * FROM TableA;
UPDATE TableA SET  columna = 'NoValue' WHERE columnb = 'No Match';
INSERT INTO TableA (columna, columnb) VALUES (NULL, NULL);
SELECT * FROM TableA;
go
       </sql>
<!-- 
-->
   </target>
</project>antoine@DJ0X820J /cygdrive/c/dev/testant

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


Mime
View raw message