Thanks all for the pros/cons of PreparedStatement; That code snippet was only *meant* to depict the problem I had with the procedure call and no way a coding practise !!

Ok. I tried this and still no different; below is the result
ij> call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.classpath','dtp.LeaveApp_jar');
0 rows inserted/updated/deleted
ij> CALL dtp.TOTAL_LEAVE_FOR_TYPE('TOM',3);
ERROR 42Y03: 'DTP.TOTAL_LEAVE_FOR_TYPE ' is not recognized as a function or procedure.

In the filesystem, I see the following
/tmp/DerbyDB/jar
/tmp/DerbyDB/jar/DTP
/tmp/DerbyDB/jar/DTP/LEAVEAPP_JAR.jar.G1144121950284

Regards
Anthos
On 4/5/06, Suresh Thalamati <suresh.thalamati@gmail.com> wrote:
Anil Samuel wrote:
> I also did
>
>
>     2. Compiled and created dtpLeaveApp.jar with this class.
>     3 . Added this jar to derby by
>     CALL SQLJ.install_jar(
>         'file:/tmp/dtpLeaveApp.jar',
>         'dtp.LeaveApp_jar',
>         0
>     );
>     4. Tried to execuet this procedure by doing
>     CALL dtp.TOTAL_LEAVE_FOR_TYPE('TOM',3);
>     but it results
>     ERROR 42Y03: ' SQLJ.INSTALL_JAR' is not recognized as a function or
>     procedure.

  I wonder how one can get "ERROR 42Y03: 'SQLJ.INSTALL_JAR"....error
  when you execute  CALL dtp.TOTAL_LEAVE_FOR_TYPE('TOM',3);

May be that error message is related to unsuccessful attempts to
execute CALL SQLJ.install_jar() ...


>
>     How do I get this working ?

To execute "CALL dtp.TOTAL_LEAVE_FOR_TYPE ('TOM',3);" successfuly
dtp.LeaveApp_jar  has to be in the database classpath.

One way to do that is :
callSYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.classpath',
'dtp.LeaveApp_jar');


hope that helps
-suresh



--
Anil Samuel <anil.samuel@oracle.com >
Senior Technical Member
Product Development
Oracle Corporation