Home All Groups Group Topic Archive Search About

how to check programatically wether a oracle stored procedure has default valued parameters?

Author
1 Aug 2006 5:13 AM
hiten
I want to get the collection OracleParameter[] of all the stored
procedure parameters which are assigned default values in stored proc.
The way in which I was trying out was to get the parameter array with
the help of OracleCommandBuilder.DeriveParameter() method.  But this
method only gives the name,datatype,size,isnullable properties of the
parameter.This method does not gives any property to check if the
parameter has default value or not.

So issues are;-
1> How to check if the parameter has default value or not?
2> How to get that default value?

thanx

Author
1 Aug 2006 11:20 AM
Miha Markic [MVP C#]
Hi

I would resort to Oracle DDL (using sql statements to query for the values
required) - sorry, I don't know the syntax out of my head.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Show quote
"hiten" <hit***@indiatimes.com> wrote in message
news:1154409207.548381.46100@75g2000cwc.googlegroups.com...
>I want to get the collection OracleParameter[] of all the stored
> procedure parameters which are assigned default values in stored proc.
> The way in which I was trying out was to get the parameter array with
> the help of OracleCommandBuilder.DeriveParameter() method.  But this
> method only gives the name,datatype,size,isnullable properties of the
> parameter.This method does not gives any property to check if the
> parameter has default value or not.
>
> So issues are;-
> 1> How to check if the parameter has default value or not?
> 2> How to get that default value?
>
> thanx
>
Author
2 Aug 2006 8:48 AM
Frans Bouma [C# MVP]
Miha Markic [MVP C#] wrote:

> Hi
>
> I would resort to Oracle DDL (using sql statements to query for the
> values required) - sorry, I don't know the syntax out of my head.

    do a select on ALL_ARGUMENTS, it returns the parameters for procs and
contains a field 'DEFAULT_VALUE', which ... is the default value :)

        FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------

AddThis Social Bookmark Button