File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and the fly likes calling postgres 7.3 functon from java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "calling postgres 7.3 functon from java" Watch "calling postgres 7.3 functon from java" New topic

calling postgres 7.3 functon from java

Raghuveer Rawat
Ranch Hand

Joined: Apr 03, 2003
Posts: 102
I am calling postgres 7.3 function that return refcursor from java but I am not successful in my attempt. Any one who has done this before.
I have tried this;
cstmt = con.prepareCall("{ ? = call fnc_get_campaigns () }");
System.out.println("Store Procedure Called");
cstmt.registerOutParameter(1, Types.Other);
rs = (ResultSet) cstmt.getObject(1);
but I came to know this is not possible in postgres7.3
is any one solution which will hanlde refcursor return by postgres.

Raghuveer Rawat<br />SCJP2
I agree. Here's the link:
subject: calling postgres 7.3 functon from java
Similar Threads
call stored procedure
How to return resultset from stored procdure
Performance problem - using Ref Cursor in stored procedure call from Hibernate
Error executing Oracle function from JSP page
How to deploy CMP Entity Bean in Jboss 3