Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How can I call a hsqldb procedure from Java

843859Sep 21 2005 — edited Sep 22 2005
Hello,


I am trying to call from Java a stored procedure but I keep having exceptions!!!
In addition, I have no idea how I can get the result of the procedure !!!!
I have spent the whole day in Internet.... no luck!!

===============================================
I[b] java.lang.Exception: +updatejava.sql.SQLException: Unexpected token: # in statement [ call MODIFY_FIELD_SEPARATOR(#) ]
at util.UtilBean.test_upd(UtilBean.java:369)
===============================================

The following procedures have been created and tested withing the database and there work.

- public static String manage_field_separator(String ifs)
-public static String manage_refresh_interval(int val)


The alias have been created:
CREATE ALIAS MODIFY_FIELD_SEPARATOR FOR "com.lucent.util.StoredProcedures.manage_field_separator";

CREATE ALIAS MODIFY_REFRESH_INTERVAL FOR "com.lucent.util.StoredProcedures.manage_frefresh_interval


My file.java contains the flollowing:
public String test_upd(String tableName, String paramValue)
                                     throws Exception
 {
   String res="0";
   Connection conn=null;
   CallableStatement cs= null;
    try
    {
      conn=DBConnection.DBConnect();
      String p="MODIFY_"+tableName.toUpperCase()+"("+paramValue+")";
  
      cs=conn.prepareCall( "{call "+p+"}");
     cs.execute();

       // Suppose to get the result res  of the function!!!!
    }
    catch (SQLException e)
    {
     exceptionMessage="+update"+e.toString();
     System.out.println("exceptionMessage="+exceptionMessage);
     throw new Exception(exceptionMessage);
    }
    finally
    {
      Statement stmt=null;
      DBConnection.closeConnection(conn,stmt);
    }
    return res;
  }
Obviously I am doing something wrong ..... but I don't know what!!!
Could you help me please?

THanks a lot!

Comments

Nik
Hi
/proc - special file system for managing/monitoring system. Realy this files don't have space on the disk.

/proc/kcore - file for mapping physical memory.


You can't give more space after removing this file, but can get more problem.

This file will present after reboot.


Regards.
Dude!
Like all other files below /proc the kcore file is only a virtual file. It contains the RAM the kernel can allocate. Therefore this should not be touched or read. It is nothing to worry about. This file doesn't use actual disk space and only exists virtually. On 64-bit systems the size of /proc/kcore is even 128TB because that's the absolute limit of what 64-bit systems can allocate.
Dude!
You cannot remove the /proc/kcore file:

[root@ol1 ~]# rm /proc/kcore
rm: remove regular file `/proc/kcore'? y
rm: cannot remove `/proc/kcore': Operation not permitted
1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 20 2005
Added on Sep 21 2005
19 comments
427 views