Article ID: 289531 - Last Review: June 29, 2004 - Revision: 1.1 How To Create ADO Disconnected Recordsets in ASP Using VBScript and JScriptThis article was previously published under Q289531 SUMMARY
This article shows one technique to create ActiveX Data Objects (ADO) disconnected recordsets in Active Server Pages (ASP) when programming with Microsoft VBScript and Microsoft JScript. This article assumes that the reader is familiar with ADO and ASP.
MORE INFORMATION
One of the ASP guidelines is to release ADO objects as soon as possible in order to release the system resources used by these objects. The disconnected recordset feature of ADO allows recordsets to exist without having an active connection; this can save database server resources and improve scalability. ADO disconnected recordsets require client-side cursors to be used, which can be done by setting the CursorLocation property of the Connection object to adUseClient.
The following sample code uses the Microsoft OLEDB Provider for SQL Server (SQLOLEDB) to connect to the sample Northwind database that comes with the SQL Server installation. To run the samples, modify the connection string and SELECT statement to suit your environment. Also, set the correct path for the ADO constants Include files. Disconnected Recordsets in VBScriptDisconnected Recordsets in JScript
-or-
http://www.netspace.net.au/~torrboy/code/jargutil
(http://www.netspace.net.au/~torrboy/code/jargutil)
In this case, the sample code might resemble the following:
REFERENCESFor additional information, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
184397
(http://support.microsoft.com/kb/184397/EN-US/
)
How To Create ADO Disconnected Recordsets in VBA/C++/Java
190717
(http://support.microsoft.com/kb/190717/EN-US/
)
INFO: Disconnected Recordsets with ADO or RDS
252482
(http://support.microsoft.com/kb/252482/EN-US/
)
BUG: ADO Disconnected Recordset That Uses Parameterized Query Is Not Disconnected by SQL Server
APPLIES TO
| Article Translations
|

Back to the top
