Need help on retrieving OUTPUT parameter in stored procedure and Visual Interdev 6.0 - SQL Server 6.5

Need help on retrieving OUTPUT parameter in stored procedure and Visual Interdev 6.0 - SQL Server 6.5

Post by Antonio Y » Tue, 06 Apr 1999 04:00:00

Hi there.  Can anyone show me a way to execute a stored procedure with input
parameters and retrieving the output parameter(s)?  The following is the
code I have in my Interdev.

/**** begin

  set cmd = server.CreateObject("ADODB.Command")

  set parm=cmd.createparameter("ProductID", 3, &H0001,,1)
  cmd.parameters.append parm

  set parm=cmd.createparameter("DateFrom", 7, &H0001,, "1/1/1999")
  cmd.parameters.append parm

  set parm=cmd.createparameter("DateTo", 7, &H0001,, "1/5/1999")
  cmd.parameters.append parm

  set parm=cmd.createparameter("RoomStatus", 200, &H0002, 20)
  cmd.parameters.append parm

  set rs = server.CreateObject("ADODB.Recordset")
  rs.Open cmd

  while not rs is nothing
    set rs = rs.NextRecordset()


/***** end

When the application executes this, I get the following error.

Microsoft OLE DB Provider for ODBC Drivers error '80040e21'

[Microsoft][ODBC SQL Server Driver]Optional feature not implemented

Can anyone help me?  What is the problem with my code?

Thank you.

Antonio Yu


1. Retrieving OUTPUT parameters after a call to a stored procedure in C module with ESQL

 Hi !

 I want to retrieve OUTPUT parameters and return code after a call to a
stored procedure (MSSQL7).

The prototype of the sp is:

 The call looks like this:

:s_StructureDoc OUTPUT

where :i_result and :s_ReturnValue are defined like this:
long i_result;
char s_StructureDoc[4000+1];

The stored procedure works fine when called from the QueryAnalyzer.

The problem is, when called from a C-module, that the code of the stored
procedure doesn't seem to execute (I've inserted a call to xp_cmdshell with
file creation at the beginning of the sp, and the file is never created).

Does anybody have an idea ???



2. Alternative to Functions in SQL server 7.0

3. retrieve value of output parameter from Stored Procedure

4. exec (@x) while @x='set @dato=@dato1' ...

5. retrieving output parameter from stored procedure in SQL2000 jdbc driver

6. Setting Global Variable for SQL Statement Results

7. Using ct-lib to execute stored procedure, can't retrieve output parameters

8. Timeseries Analysis Software Needed???

9. Retrieving output parameters AND updating image/text column from single stored procedure using DBLibrary

10. Retrieving datas with stored procedure and OUTPUT parameters

11. Retrieving output parameters from Oracle stored procedure

12. Problem retrieving value of output parameter following execution of stored procedure

13. Unable to retrieve image data from stored procedure output parameter