How Get Paramenter information in Stored Procedure (DataType,Null

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I want information of Parameters in Stored Procedure, like DataType, Null or
not...
I am using for table SqlDataAdapter.FillSchema and that work fine, so I need
some like that??
 
I think I give more detail what I am looking for.

I am creating one function that have parameters is
ByVal ConnectionString as string
ByVal StoredProcedureName as string
ByRef ParametersNameValue as NameValueCollection

So I need set SQLParameters runtime for that I need parameters information
Like SqlDbType, Direction…

After ExecuteNonQuery Stored Procedure set value in ParameterNameValue
Collection if parameter is OutPut.

So one function run all Stored Procedure

I think that help you to understand my question

Thanks

W.G. Ryan eMVP said:
http://msdn.microsoft.com/library/d...lCommandBuilderClassDeriveParametersTopic.asp

Take a look at the Data Access Application Block - it's got a working
example although I think this is straightforward enough to get you what you
want.
 
The answer is still the same. Microsoft DAB has a class called
SqlParameterCache that uses CommandBuilder.DeriveParameters to do what
you're trying to do.

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik


MrDotNet said:
I think I give more detail what I am looking for.

I am creating one function that have parameters is
ByVal ConnectionString as string
ByVal StoredProcedureName as string
ByRef ParametersNameValue as NameValueCollection

So I need set SQLParameters runtime for that I need parameters information
Like SqlDbType, Direction.

After ExecuteNonQuery Stored Procedure set value in ParameterNameValue
Collection if parameter is OutPut.

So one function run all Stored Procedure

I think that help you to understand my question

Thanks
 
Back
Top