Skip to main content
August 28, 2009
Question

how I ca have the name of parameters of an stored procedure?

  • August 28, 2009
  • 2 replies
  • 1557 views

Hi,

I have an stored procedure with a lot of parameters. I want to list them automatically by writing codes to show me the name of all parameters

thanks,

mandana

This topic has been closed for replies.

2 replies

Inspiring
August 29, 2009

<cfdbinfo> can't help you here.  I've lobbied to get it enhanced so that it returns actual useful info regarding procs, but it fell on deaf ears.  I suspect because it would involve more work than simply putting a CF wrapper around the underlying JDBC DatabaseMetaData class, which is all <cfdbinfo> really does, as it stands now.

There are some issues raised to improve <cfdbinfo> (listed below).  It would be helpful if you voted for them.

http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=75686

http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=75684

Back to your original question... it's a bit hard to answer this without you saying what DB system you're using, as the answer will be different depending on the system.

--

Adam

Inspiring
August 29, 2009

Back to your original question... it's a bit hard to answer this without you saying what DB system you're using, as the answer will be different depending on the system.

Actually one can do it with JDBC easily enough, so the solution would be DB-independent.

Have a look at this: http://java.sun.com/javase/6/docs/api/java/sql/DatabaseMetaData.html, specifically http://java.sun.com/javase/6/docs/api/java/sql/DatabaseMetaData.html#getProcedures(java.lang.String,%20java.lang.String,%20java.lang.String) and http://java.sun.com/javase/6/docs/api/java/sql/DatabaseMetaData.html#getProcedureColumns(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String).

I did have some proof-of-concept code for this at some stage, but I cannae find it now, sorry.

--

Adam

August 31, 2009

I will see the links you sent me.

Thanks,

Mandana

Inspiring
August 28, 2009

Read Adam Cameron's answer to the other thread you started.

August 28, 2009

That one works for table not stored procedure.