Hien, I deploy stored procedures to Oracle, but not with ant. There is no ant task that I know of for deploying packages and procedures, but it would be great if there was.
-Rob Anderson -----Original Message----- From: Hien Q. Nguyen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 6:44 AM To: Ant Users List Subject: RE: Writing a DB2 Java Stored Procedure compiling task Hi Kola, I'm aware of the sql task but what I meant was a task to compile a SQLJ JAVA STORED PROCEDURE Here is an example Java stored proc: package javastoredproc; #sql iterator MyIter ( int, int ); public class MyJavaStoredProc { public static void myJavaStoredProc( ResultSet rs[] ) throws SQLException, Exception { MyIter myIter=null; #sql myIter= { select columnA, columnB from some_table }; //...bla..bla..bla... } } In DB2, the compilation steps are: 1. First the source is process by sqlj (a db2 utility) to generate the appropriate code 2. javac on genrated code 3. db2profc (a db2 utility for profiling the sqlj stored proc.) 4. now the create stored proc statement, i.e. CREATE PROCEDURE HIEN.MYJAVASTOREDPROC ( ) EXTERNAL NAME '"HIEN".MYJAVASTOREDPROC:javastoredproc.MyJavaStoredProc.myJavaStoredProc SPECIFIC HIEN.MYJAVASTOREDPROC RESULT SETS 0 LANGUAGE JAVA PARAMETER STYLE JAVA NOT DETERMINISTIC FENCED NO DBINFO NULL CALL MODIFIES SQL DATA ; Does anybody use sqlj stored. procedure? Its available in Oracle, DB2, & Sybase(?) Thanks, --Hien "Fajimolu, Kola" <[EMAIL PROTECTED]> wrote:Hi Happy New Year to All This book has a section on creating a database using ant. It uses the Ant sql task to create a DB and insert data. Through the examples given I think you will be able to create your stored procedures. You could download the source code for the book for example of ??? http://www.amazon.com/exec/obidos/tg/detail/-/047120708X/104-2318894-5881526 ?vi=glance KolaF > -----Original Message----- > From: "Antoine Levy-Lambert" > @MCGRAW-HILL > Sent: Tuesday, January 07, 2003 8:11 AM > To: Ant Users List > Subject: Re: Writing a DB2 Java Stored Procedure compiling task > > > There is a SQL task in ant, which requires a JDBC driver. If you are using > a > JDBC driver for DB2, and > the JDBC driver supports the creation of stored procedures, you can create > your stored procs with ant. > Antoine > ----- Original Message ----- > From: "Hien Q. Nguyen" > To: > Sent: Tuesday, January 07, 2003 5:58 AM > Subject: Writing a DB2 Java Stored Procedure compiling task > > > > Hi, > > > > I want to use Ant to build our back end DB2 Java > > Stored Procedures and I've searched the list and > > looked around the website but couldn't find anything. > > I'm wondering if anybody has done/wanted such a task. > > If not I'd like to write one and share with the > > community. Any comments, suggestions are greatly > > appreciated. > > > > Thanks, > > --Hien > > > > __________________________________________________ > > Do you Yahoo!? > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > > http://mailplus.yahoo.com > > > > -- > > To unsubscribe, e-mail: > > > For additional commands, e-mail: > > > > > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > > > ATTACHMENT part 2 application/ms-tnef -- To unsubscribe, e-mail: For additional commands, e-mail: . . . . . . [EMAIL PROTECTED] "Give me a lever and a fulcrum, and I can move the globe." --Archimedes --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>