• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to return cusror from PL/SQL script?

 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to return cursor from pl/sql procedures to java and other front end tools?

Thanks in advance,
Yamini
 
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try on google.

There are number of results.

Shailesh
[ April 07, 2005: Message edited by: Shailesh Chandra ]
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Declare the out parameter for the procedure as recordset
Eg.// o_out_data OUT PKG_NAME.recordset
2. use -
OPEN o_out_data
FOR
//SELECT STATEMENT GOES HERE
3. End of the package.

This should be accessed through Java as
cstmt.registerOutParameter(1,OracleTypes.CURSOR);
and to cast it into ResultSet
rs = (ResultSet)cstmt.getObject(1);

This should work.

Have fun..
 
I do some of my very best work in water. Like this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic