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

H

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
 
M

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.
 
F

Frans Bouma [C# MVP]

Miha said:
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#)
------------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top