954,595 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Store Pro & out Parameters

i can handle a store procedure which returns one output parameter using ExecuteScalar()

but wot if my store procedure returns more than one parameter
then how can i handle it. any advice Adapost ?

dnanetwork
Practically a Master Poster
Banned
633 posts since May 2008
Reputation Points: 28
Solved Threads: 106
 

i think by following below code, we can retrieve value of more than one parameter. The code is for one parameter.

SqlParameter returnValueParam = cmd.Parameters.Add(@return,SqldbType.Int);
returnValue.Direction = ParameterDirection.ReturnValue;
cmd.ExecuteNonQuery();
int returnValue = (int) returnValueParam.Value;

rohand
Posting Whiz in Training
293 posts since Mar 2010
Reputation Points: 17
Solved Threads: 56
 

thnx rohand...i'll check and let u know...

dnanetwork
Practically a Master Poster
Banned
633 posts since May 2008
Reputation Points: 28
Solved Threads: 106
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: