ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Grey <haam...@haamdhani.com>
Subject Newbie: <sql> task and executing an Oracle Stored Procedure
Date Fri, 13 Aug 2004 16:19:40 GMT
Why can't I use the <sql> task to exec an Oracle stored procedure ?

<target name="test">
  <sql driver="${db.driver}" 
       url="${db.url}" 
       userid="${db.user}" 
       password="${db.pwd}" 
       classpath="${profileLibPath}/ojdbc14.jar"
       print="true"
       showheaders="true">

	exec myStoredProc(1);

  </sql>
</target>

All my driver settings etc are correct, in that I can replace the exec SQL above with a simple
select * from table type SQL command.

But, running the above task as is, gives me the following error. And yes, I am using 1.5.1
(for a reason).

--

Apache Ant version 1.5.1 compiled on October 2 2002
Buildfile: build.xml
test:
      [sql] connecting to jdbc:oracle:thin:@boreas:1555:prodevel
      [sql] Loading oracle.jdbc.driver.OracleDriver using AntClassLoader with classpath classpath
C:\build\lib\ojdbc14.jar
      [sql] Executing commands
      [sql] SQL: exec myStoredProc(1);
      [sql] Failed to execute: exec myStoredProc(1)

BUILD FAILED
file:C:/Profile5/build_borland/build.xml:524: java.sql.SQLException: ORA-00900: invalid SQL
statement

        at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:406)

etc

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


Mime
View raw message