• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

REFCURSOR in getCursor CallableStatement

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I was calling a stored package procedure which was returning REFCursor (i am using oracle 8i as backend) through jdbc
and
was importing the Oracle JDBC drivers which support bind variables of type REFCURSOR.(classes from the oracle.jdbc.driver package)
Used the getCursor method of the CallableStatement to convert a REFCURSOR value returned by a PL/SQL block into a ResultSet.
Casting the corresponding CallableStatement to oracle.jdbc.driver.OracleCallableStatement to use the getCursor method.
The problem is this works absolutely fine if i connect as the owner of the package procedure.
but if i create a public syonym for the same package and grant execute on package to other user.
And now if i connect as this execute privilege granted user through jdbc and run the same program it gives me SQLException ora-09542 table or view does not exit.
I am just unable to understand how do i proceed in this case, as no way i can have the package procedure being created in the same user doesn't sound implementable in live environment.
I am using jdk1.3.
Please help me. I hope i have given required info to get an answer.
Thanks.
Geeta
 
Geeta Rajgor
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Somehow, i got the answer of the question that i put, all those who must have gone through this question.
The answer is very simple. It is a stupid bug in oracle 8.1.6 driver which is fixed in 8.1.7 driver. Use oracle 8.1.7 driver to achieve the same.
 
reply
    Bookmark Topic Watch Topic
  • New Topic