.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ADO.Net >> Post New QuestionBookmark and Share Subscribe to Forum

get value from output parameter from stored procedure

Posted By: Shweta     Posted Date: May 06, 2010    Points:2   Category :ADO.Net
Hi,

How to get value returned from stored procedure via output parameter in C# and SQL Server?

Responses
Author: Lalij Mer             
Posted Date: May 06, 2010     Points: 5   

Try this link will help u

http://msdn.microsoft.com/en-us/library/ms255336%28VS.80%29.aspx

Please Check my answer if you help....
Thank You...

Lalit.
Author: Lakhan Pal Garg             
Posted Date: May 06, 2010     Points: 5   

Hi Shweat-
In SQL Server ou can use like this:
CREATE PRC ABC
(
@FirstParame INT,
@OutParam INT OUTPUT
)

AS
SELECT TOP 1 @OutParam=Col2 from table1 WHERE Col1=@FirtsPatam


IN C# you can Set tHe Direction of SQL Parameter AS Output then Get the value of Output parameter after execution of Method (ExecuteNonQuery etc..)

Thanks
Lakhan Pal Garg



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend