How to capture the return value and output parameter value of a stored procedure in VB

How to capture the return value and output parameter value of a stored procedure in VB

Post by Fion » Thu, 06 Dec 2001 03:01:53



Hi all,

How can i capture the return value and output parameter value of a stored
procedure in VB?

Thanks!

 
 
 

How to capture the return value and output parameter value of a stored procedure in VB

Post by Umachandar Jayachandra » Thu, 06 Dec 2001 06:30:09


    You have to use the ADO Command object & the Parameters collection. See
the samples in BOL or MSDN or VB docs.

--
Umachandar Jayachandran
SQL Resources at http://www.umachandar.com/resources.htm
( Please reply only to newsgroup. )

 
 
 

How to capture the return value and output parameter value of a stored procedure in VB

Post by Keith Kratochvi » Fri, 07 Dec 2001 04:07:35


You will probably receive an answer if you post this question within
vb.programming

--
Keith, SQL Server MVP


Quote:> Hi all,

> How can i capture the return value and output parameter value of a stored
> procedure in VB?

> Thanks!

 
 
 

1. Stored procedure returning empty output parameters or return value

I have a stored procedure that when passed a username I want to call
sp_droplogin. If this call fails (user or aliased in a database)
return error value -1. If successful return 1.

I can get it to work using sql oledb whether it fails or not, but not
using a ODBC DSN. If it is successful I get 1 returned if it fails I
get nothing at all. I have to use the DSN approach so I need to figure
out what's going on.

I've tried using both a output parameter and a return value with the
same results.

I'm developing in VB 6, SQL 7, MDAC 2.6

Also, even when I set a default value for the output parameter/return
value before I call sp_droplogin, it gets wiped out and nothing is
returned.

Any help would be appreciated.

Steve

2. How to run a "Local" Package Remotely??

3. Return value and Output values from Stored Procedure

4. Trying to run a query from a form field

5. JDBC: return values and output parameters from stored procedures

6. SQL Server Problems on an IBM Server...?

7. Getting OUTPUT parameters and return values from Stored Procedures

8. Programmer Analyst position available

9. Unix shell script capturing return value of stored procedure

10. Return Values and Output parameters of stored proc

11. Stored proc not returning values with output parameters

12. Return Values and OUTPUT Parameters of Stored Proc

13. ODBC calling stored proc: Can't get output parameter or return value to work