Home All Groups Group Topic Archive Search About

How Get Paramenter information in Stored Procedure (DataType,Null

Author
6 Jan 2005 12:51 AM
MrDotNet
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??

--
-MrDotNet MCAD, MCSD
Sr. Software Engineer / Lead Architect
Author
6 Jan 2005 1:02 AM
W.G. Ryan eMVP
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDataSqlClientSqlCommandBuilderClassDeriveParametersTopic.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.
--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
Show quoteHide quote
"MrDotNet" <MrDot***@discussions.microsoft.com> wrote in message
news:A249377C-6BB1-4059-A2C4-2AD183F174DC@microsoft.com...
> 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??
>
> --
> -MrDotNet MCAD, MCSD
> Sr. Software Engineer / Lead Architect
>
Are all your drivers up to date? click for free checkup

Author
6 Jan 2005 1:35 AM
MrDotNet
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

Show quoteHide quote
"W.G. Ryan eMVP" wrote:

>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDataSqlClientSqlCommandBuilderClassDeriveParametersTopic.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.
> --
> W.G. Ryan MVP (Windows Embedded)
>
> TiBA Solutions
> www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
> "MrDotNet" <MrDot***@discussions.microsoft.com> wrote in message
> news:A249377C-6BB1-4059-A2C4-2AD183F174DC@microsoft.com...
> > 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??
> >
> > --
> > -MrDotNet MCAD, MCSD
> > Sr. Software Engineer / Lead Architect
> >
>
>
>
Author
6 Jan 2005 6:34 AM
Sahil Malik
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


Show quoteHide quote
"MrDotNet" <MrDot***@discussions.microsoft.com> wrote in message
news:089FCC5E-0153-4BB7-ABFF-A731526B008E@microsoft.com...
>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" wrote:
>
>>
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDataSqlClientSqlCommandBuilderClassDeriveParametersTopic.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.
>> --
>> W.G. Ryan MVP (Windows Embedded)
>>
>> TiBA Solutions
>> www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
>> "MrDotNet" <MrDot***@discussions.microsoft.com> wrote in message
>> news:A249377C-6BB1-4059-A2C4-2AD183F174DC@microsoft.com...
>> > 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??
>> >
>> > --
>> > -MrDotNet MCAD, MCSD
>> > Sr. Software Engineer / Lead Architect
>> >
>>
>>
>>
Author
6 Jan 2005 5:51 PM
MrDotNet
Hi Sahil & Ryan

Thanks very much, I got it its working fine.
you guys great :)

Thanks

Show quoteHide quote
"Sahil Malik" wrote:

> 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" <MrDot***@discussions.microsoft.com> wrote in message
> news:089FCC5E-0153-4BB7-ABFF-A731526B008E@microsoft.com...
> >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" wrote:
> >
> >>
> >> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDataSqlClientSqlCommandBuilderClassDeriveParametersTopic.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.
> >> --
> >> W.G. Ryan MVP (Windows Embedded)
> >>
> >> TiBA Solutions
> >> www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
> >> "MrDotNet" <MrDot***@discussions.microsoft.com> wrote in message
> >> news:A249377C-6BB1-4059-A2C4-2AD183F174DC@microsoft.com...
> >> > 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??
> >> >
> >> > --
> >> > -MrDotNet MCAD, MCSD
> >> > Sr. Software Engineer / Lead Architect
> >> >
> >>
> >>
> >>
>
>
>

Bookmark and Share