My nant script to execute sqlplus.exe looks like following
exec program="sqlplus.bat" basedir="${base.dir}" workingdir="${base.dir}" output="log.txt" failonerror="false" resultproperty="execresult"
arg line="${app.sqlplus} ${db.username} ${db.password} ${db.schema} ${var.exec.file} ${db.username} ${db.password}"
end exec
SqlPlus.bat has following contents
echo exit | %1 %2/%3@%4 @%5 %6 %7
I would ideally want to check the "execresult" which is the error code from exec command and show the respective message.
I have tried using the following statement in my SQL file but it did not help.
WHENEVER SQLERROR EXIT SQL.SQLCODE
Could you please point out the problem and possible solution ?