Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 get @return_value from stored proc using only SQL
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

2 Posts

Posted - 02/19/2008 :  12:50:01  Show Profile  Reply with Quote
Hello folks,

First I would like to apologize if this has been asked before, but you see I am in a bit of a hurry and haven't much time to read.

I need to get the @return_value of a stored procedure as part of a recordset. A custom data access layer prevents me from simply obtaining the @return_value using the regular methods.

A bit of background:
I have a static class

public member DB.SQL //SQL Command
public method DB.Execute() //Executes SQL command, returns recordset

This class demonstrates the confines in which I must code. You see I only have a string of pure sql with which to obtain the @return_value of a stored proc I cannot modify. It's not right or correct, but this is the situation I find myself in.


Very Important crosS Applying yaK Herder

52326 Posts

Posted - 02/20/2008 :  00:04:35  Show Profile  Reply with Quote
Did you try using OUTPUT parameters in stored procedure to retrieve the values you want? Procedures/outputparameters/1200/

Edited by - visakh16 on 02/20/2008 00:05:43
Go to Top of Page

Starting Member

2 Posts

Posted - 02/20/2008 :  09:07:35  Show Profile  Reply with Quote
Thanks for the response.

I gave up after about an hour of's not my problem anymore, but thanks for the response anyway :D
Go to Top of Page

Dr. Cross Join

7423 Posts

Posted - 02/20/2008 :  11:34:23  Show Profile  Visit jsmith8858's Homepage  Reply with Quote
That is the worst data access layer I have ever seen.

- Jeff
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000