Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is it possible to get the parameter names in a stored procedure call ?

 
salvin francis
Bartender
Posts: 1274
10
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are developing a database front end application with limited functionality as a web based application.
We want to give the user the flexibility to allow to execute stored procedures.

Now, As I understand, they can be called like this:

Quoted from http://docs.oracle.com/javase/tutorial/jdbc/basics/storedprocedures.html :
What I am interested to know is is there any way I come to know information about parameters to be passed. For example, in the above code, the RAISE_PRICE requires 3 parameters
2 incoming 1 outgoing with types String, Numeric, Numeric


I tried something like:


whats interesting is that the parameterMetaData.getParameterCount() shows 0.
if I change statement to:


The parameterMetaData.getParameterCount() shows 2

Is there any way for me to come to know the Parameter information given that i know the procedure name ? (Am using Oracle at the moment, but this may change)
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have any experience with that, but according to the Connection documentation, the getProcedureColumns method should provide this information.
 
salvin francis
Bartender
Posts: 1274
10
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Martin Vajsar wrote:I don't have any experience with that, but according to the Connection documentation, the getProcedureColumns method should provide this information.


Found this out the Hard way ... The catalog/schema/procedure names are all Case sensitive !!!

Works like a miracle !!!
Thanks mate.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic