Microsoft KB Archive/193231

= How To Access The Recordset DTC's Underlying ADO Recordset =

Article ID: 193231

Article Last Modified on 3/16/2005

-

APPLIES TO


 * Microsoft Visual InterDev 6.0 Standard Edition

-



This article was previously published under Q193231



SUMMARY
The underlying ActiveX Data Objects (ADO) Recordset created when a Recordset Design-time control (DTC) is included on an Active Server Page (ASP) can be accessed from ASP script using the getRecordSource method of the Recordset Design-Time Control.



MORE INFORMATION
The getRecordSource method of the Recordset DTC returns a copy of the ADO Recordset that is the source of the Recordset DTC. The following example sets an object to be the source ADO Recordset of a Recordset DTC and creates an HTML table of the field names and values.  Open a project in Visual InterDev 6.0 and add a Data Connection (if one does not already exist). Add an Active Server Page to the project. Insert a Recordset DTC in the Active Server Page after the  tag. Right-click the Recordset DTC and select Properties. Set the Name to "Recordset1," the Source of Data to "Database object," and the database object to "Tables." Set the Object Name to a table of your choice.  To access the Recordset generated by the Recordset DTC from ASP, insert the following VBScript code after the Recordset DTC: <%     '      'Where Recordset1 is the name of your Recordset DTC '     Dim tempRS Set tempRS = Recordset1.getRecordSource

Response.Write " "

Set tempRS = Nothing %>                       </li></ol>

This is just one example of the capability available. Once you have the ADO Recordset object, all of the ADO Recordset methods and properties are available.

Keywords: kbhowto kbsample kbctrl KB193231

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.