BUG: setParameter Does Not Work in Client Scripting Platform

ID: Q191149


The information in this article applies to:


SYMPTOMS

When the "DTC Scripting Platform" is set to "Client(IE 4.0 DHTML)," the getParameter and setParameter methods fail to function on the Recordset Design-time control (DTC). This affects stored procedures and parameterized queries.


CAUSE

The Client DTC Scripting Platform does not support the getParameter and setParameter methods.


RESOLUTION

The workaround for this issue is to set the setSQLText property such that the parameters are a part of the SQL statement.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.


MORE INFORMATION

The setParameter and getParameter methods will fail from the client scripting platform. Here's an example:


   rsByRoyalty.setParameter(0, 50);   //This will fail

   Recordset1.setSQLText("Select * from authors where state = ?");
   Recordset1.setParameter(0, "CA"); //This will fail 
The following are examples of setting the setSQLText property to obtain the functionality of a stored procedure with parameters or a parameterized query, for example:

   Recordset1.setSQLText('"byroyalty" 50');

   Recordset1.setSQLText("Select * from authors where state = 'CA'"); 

Additional query words:


Keywords          : kbVisID600 kbVisID600bug kbGrpASP 
Version           : WINDOWS:6.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: May 24, 1999