PRB: Passing a Parameter to a Stored Procedure Using a Client-Side Recordset Design-Time Control (233987)



The information in this article applies to:

  • Microsoft Visual InterDev 6.0

This article was previously published under Q233987

SYMPTOMS

When passing a parameter to a stored procedure using a Recordset Design-Time Control (DTC) that is marked as client on an Active Server Page (ASP), the getParameter and setParameter methods are not supported. This problem occurs when using either VBScript or Jscript (or JavaScript).

CAUSE

This problem occurs when the Recordset DTC is set for Client(IE 4.0 DHTML) on an ASP page.

To see where you can set the Recordset DTC for Client(IE 4.0 DHTML), right-click the Recordset DTC and select Properties. In the Implementation tab, select Client(IE 4.0 DHTML) in the Scripting Platform list box.

When the Recordset DTC is set for Client(IE 4.0 DHTML), the Recordset DTC uses Remote Data Service (RDS) to access data from a database. Hence, the getParameter and the setParameter methods are not supported by RDS.

RESOLUTION

A simple workaround is to simply send the parameters to the stored procedure using the setSQLText method of the Recordset DTC.

The following VBScript code segment calls the byRoyalty stored procedure in the sample Pubs database on SQL Server:
Recordset1.setSQLText "exec byRoyalty 60"
				
NOTE: In SQL Server, the exec command is used to call a stored procedure. In Oracle, the call command is used to execute an Oracle stored procedure encapsulated in a package and package body. Please refer to the Knowledge Base article in the REFERENCES section later in this article on how to create an Oracle stored procedure and encapsulate it in a package and package body.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a Web project in Visual InterDev 6.0.
  2. Add a data connection to the database.
  3. Add an ASP page to the Web project.
  4. Add a Recordset DTC on the ASP page.
  5. Set the Recordset DTC to use Client(IE 4.01 DHTML) for the Scripting Platform.

REFERENCES

For additional information on how to create an Oracle stored procedure and encapsulate it in a package and package body, click the article number below to view the article in the Microsoft Knowledge Base:

176086 HOWTO: Retrieve Recordsets from Oracle Stored Procs Using ADO


Modification Type:MajorLast Reviewed:4/22/2001
Keywords:kb3rdparty kbCtrl kbprb KB233987