ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: How to check whether database exists and then proceed ?
Date Fri, 26 Sep 2008 07:29:43 GMT



-----Original Message-----
From: Kothari, Shivani [mailto:skothari@inteqnet.com]
Sent: Friday, September 26, 2008 9:19 AM
To: Ant Users List; Jan.Materne@rzf.fin-nrw.de
Subject: RE: How to check whether database exists and then proceed ?

/*
Hi,
Prob is I want to proceed further in the build script....in both the cases  If db doesnot
exists then prompt the user and continue the script and if does continue the script

*/

AFAIK, the sql task has no errorproperty like f.e. the java task,so you
can't do stuff like that =

<sql ... errorproperty="${sqlfailure} ..... >

<target name="promptuser" if="sqlfailure">
...


but you may use the <sql onerror="fail"> within a <try> <catch>
construct.

try / catch is part of the antcontrib task suite, see =
http://ant-contrib.sourceforge.net/tasks/tasks/trycatch.html

download=
http://sourceforge.net/project/showfiles.php?group_id=36177&package_id=28636

pick Version 1.0b2 or 1.0b3


Regards, Gilbert


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


Mime
View raw message