|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How Get Paramenter information in Stored Procedure (DataType,NullHi
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
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. -- Show quoteHide quoteW.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 > 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 > > > > > 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 >> > >> >> >> 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 > >> > > >> > >> > >> > > >
Other interesting topics
DBnull, Date and DataAdapter
Bulk Insert Via SQLCommand? GetChildRows - Finding Deleted ChildRows ? Constraint violated but no exception thrown Problem with Update Adapter Really need some help on this Handling very huge data typed dataset and sort order on save How to get a code of stored procedure ? Null returns from DataAdapter.Fill() |
|||||||||||||||||||||||