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
ERROR 42Y03: 'DTP.TOTAL_LEAVE_FOR_TYPE ' is not recognized as a function or procedure.

In the filesystem, I see the following

On 4/5/06, Suresh Thalamati <> 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
>     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 :

hope that helps

Anil Samuel < >
Senior Technical Member
Product Development
Oracle Corporation