PRB: JScript Run-Time Error Message 800A1391: 'Recordset1' Is Undefined (254247)



The information in this article applies to:

  • Microsoft Visual InterDev 6.0

This article was previously published under Q254247

SYMPTOMS

When you use a Visual Interdev data command and the design-time controls (DTCs) on an Active Server Pages (ASP) page, the following error may occur when the page is browsed if the Visual InterDev scripting platform was set to client:
Microsoft JScript runtime (0x800A1391)
'Recordset1' is undefined
If the scripting platform was set to server in the Visual InterDev Source Editor, the following error may occur:
Error: Object Expected
These errors occur only if Visual Studio Service Pack 3 is installed on the Visual InterDev development computer. If Service Pack 3 is not installed on the computer, no errors occur and the page appears blank.

CAUSE

When you drag a data command from the Project Explorer onto a page in the Visual InterDev Source Editor, code is generated that depends on which scripting platform has been defined for the page. When the scripting platform of a page is changed, the code that was previously generated for existing design-time Controls (DTCs) is not updated in the Visual InterDev Source Editor. Because the code does not change, the objects have connection information that only works on the original scripting platform.

RESOLUTION

To resolve this problem, change the scripting platform before you drag the data command and the DTCs onto the page.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Right-click the Global.asa in the Project Explorer and select Add Data Connection. Follow the steps to create a connection.
  2. After you create the data connection, go to the Data View window. Click the plus sign next to the database connection to open the connection. Click the plus sign next to Tables to expand the list of database tables.
  3. Drag one of the tables from the Data View window and drop it onto the data connection in the Project Explorer window. This creates a data command for the table.

    NOTE: If you are unable to see the data connection in the Project Explorer window, click the plus sign next to the Global.asa. After you click the plus sign you will see the data environment. Click the plus sign next to the data environment to expand it.
  4. Drag the table from the data connection and drop it onto an ASP page that is in the Visual InterDev Source Editor. When you are prompted to enable the scripting object model, click yes.
  5. In the Project Explorer window, expand the data command. To do so, click the plus sign next to it to see the table fields. Drag some fields from the table and drop them onto the ASP page in the Visual InterDev Source Editor.
  6. Right-click the page and choose Properties. Change the DTC scripting platform to client.

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