Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting SQL Server stored proc return value
Message
De
10/12/2003 10:01:44
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, États-Unis
 
 
À
10/12/2003 02:29:30
Dorin Vasilescu
ALL Trans Romania
Arad, Roumanie
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00856398
Message ID:
00857650
Vues:
21
Hi Dorin,
Your example is one of the ways to get data back from a stored proc but my specific situation is when the "RETURN *some integer*" structure is used in a proc, for exapmle, when an completion code is passed back along with a possible data set. In this case I need to catch that value. Sergey had a good solution in the way that the proc is called. Thanks.

Gary



>Hi
>Is possible to return data as a rowset with a single line then?
>Or using a temporary table, insert one row with needed data and return data from that table as SELECT {return_column} FROM ... ?
>Just ideas.
>I've checked, the following code works for a MSDE stored procedure. I don't know if is good or bad, I don't use MSDE (yet)
>
>CREATE PROCEDURE GetOneValue
>AS
>create table #MyRetValue (ReturnedData Integer)
>insert into #MyRetValue (ReturnedData) values (150)
>select * from #MyRetValue
>drop table #MyRetValue
>
>
>Dorin
>
>>Dorin,
>>Doesn't seem to work in the case of a RETURNed value, but thanks anyway.
>>
>>Gary
>>
>>>Hi
>>>
>>>? SQLEXEC(nConnection,[select * from MyProc])
>>>
>>>doesn't work?
>>>
>>>>Hi,
>>>>Does anyone know how to get a return value from a SQL Server stored proc? For example, if I have a line of code "RETURN 123" in the proc, how do I receive that? The proc doesn't take an output parameter, just returns a number.
>>>>
>>>>? SQLEXEC(nConnection,[exec MyProc]) && Returns a 1 showing that the call didn't have an error
>>>>
>>>>Thanks.
>>>>
>>>>Gary
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform