
- Forum
- Database
- SQL Server
- How to retrive values from Stored procedures in .net?
How to retrive values from Stored procedures in .net?
This is a discussion on How to retrive values from Stored procedures in .net? within the SQL Server forums, part of the Database category; Hello anyone, Can anyone tell me how to retrive the values from "Stored Procedures" using .net. I know oneway is ...
-
10-31-2006, 10:30 PM #1
How to retrive values from Stored procedures in .net?
Hello anyone,
Can anyone tell me how to retrive the values from "Stored Procedures" using .net.
I know oneway is using " Out parameters".
can anyone suggest the other?????
-
I would use sqldatareader.. so you can loop throug..
there is no need to define any out parameters in the procedure..
create procedure
in parameters
select * from table
retruns all the records you need as datareader which you can loop through...
-
11-01-2006, 01:01 PM #3
Thanks
hai, thanks for giving one solution.
but my real problem is:
1.if we return any value in stored procedure using "return"(keyword) statement then how catch the return value in C#
2. simillar the above how fetch the returnerror message in C#
-
hi
if u use sqlcommand for executing stored procedure by wizard, return value stored in sqlcommand.parameter(0).value after sqlcommand.executeScalar().
if you write the code by yourself, you must add a parameter as RETURN type in add parameter list.
-
Sponsored Ads

Reply With Quote





