message completed:
Hi
Thanks for the input. I'm currently only using ant 1.6 but would need to
upgrade to 1.6.2 to be able to use redirector feature. So for now I have
added the lines to the sqlscripts and now I get the build error message.
Thanks alot for your input.
However there would still be an issue where I try to make the database
connection, and it failes there. Then I don't get to the script file.
This is what im doing:
<exec dir="${project.configdir}" executable="sqlplus"
failifexecutionfails="true" failonerror="true"
resultproperty="sqlresultproperty" errorproperty="sqlpluserror">
<arg value="user/[EMAIL PROTECTED]"/>
<arg value="@sql.file"/>
</exec>
I also need to catch the error where the alias might be wrong. Is there
a way to get such a error message ??
-----Oprindelig meddelelse-----
Fra: Dick, Brian E. [mailto:[EMAIL PROTECTED]
Sendt: 15. marts 2005 14:49
Til: Ant Users List
Emne: RE: Handling Exec errorcodes
At the beginning of your sqlplus script you should add something similar
to the following.
whenever oserror exit failure rollback
whenever sqlerror exit failure rollback
These lines will cause sqlplus to set the exit code. If you don't want
to hardcode these lines in all of your sqlplus scripts, you can use
ant's redirector feature to prepend them at runtime.
-----Original Message-----
From: Henrik Skovhus Poulsen [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 8:37 AM
To: [email protected]
Subject: Handling Exec errorcodes
Hi
I'm currently trying to call sqlplus from the exec task. But I kinda
need away to know if the command succedes or not.
I been using the resultproperty option to see if the return code is
different from when the command is a success and when its a failure. But
this is not the case.
Does anyone have an idea to how you can handle error messages when you
call the exec task??
Kind regards
TDC Kabel TV
Henrik Skovhus Poulsen
Strandlodsvej 30
0900 Copenhagen
P+ 45 32638129
E [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]