Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Guest
Aug 28, 2009 Aug 28, 2009

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

TOPICS
Database access
1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 28, 2009 Aug 28, 2009

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 28, 2009 Aug 28, 2009

That one works for table not stored procedure.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 28, 2009 Aug 28, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 28, 2009 Aug 28, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 31, 2009 Aug 31, 2009
LATEST

I will see the links you sent me.

Thanks,

Mandana

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources