Problem getting parameter returned from stored procedure in VB 
Author Message
 Problem getting parameter returned from stored procedure in VB

Hi,
I have a stored procedure that returns a parameter. In asp, I call the
procedure this way:
Set objCmd.ActiveConnection = objConn
objCmd.CommandText = my_sql_String
objCmd.CommandType = adComdText
objCmd(0).Direction = adParamReturnValue
objCmd.Execute
returnValue = obCmd(0)

This works in ASP. If I use the same in VB writing a COM object, I get
"Syntax error or access violation" at the line: objCmd(0).Direction =
adParamReturnValue

Any idea why?

As the sql string, I tried "Exec insert_table..." and "{?=Call insert_table
(... "
The insert works if I comment out the offending line.

Thanks



Sat, 01 Mar 2003 05:29:21 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problems with getting output parameters from a Stored Procedure

2. Getting a return value from a SQL Server stored procedure through VB

3. ado recordsets from stored procedures, stored procedures have input parameters

4. Problem with VB passing parameters to Crystal Report - Stored Procedure

5. Accessing return parameter from SQL server Stored Procedure

6. No Values in my Stored Procedures Return Parameters

7. SQL 6.5 stored procedure - parameter not returning

8. How to return Parameters and Recordset from Oracle Stored Procedure with ADO

9. Help! Stored Procedure Return/Output Parameters

10. ADO - Getting Stored Procedure Return codes

11. Getting a return value from a stored procedure in SQL Server

12. Output Parameter of Stored Procedure can't be gotten

 

 
Powered by phpBB® Forum Software