Article ID: 248255 - Last Review: August 30, 2004 - Revision: 5.4 How to use the ADO recordset, record and stream objects to open documentsThis article was previously published under Q248255 SUMMARY In Microsoft OLE DB Provider for Internet Publishing, you can open folders and documents into ADO records and ADO recordsets.
An ADO record object can represent a row in a recordset, or a single document
or folder opened directly. An ADO stream object represents a file in memory. It
can be used to display a document that is contained in a record object. MORE INFORMATION An ADO record object can represent a row in a recordset, or
a single document or folder. The example code in this article describes opening a record from
a row in an ADO recordset, and directly on a document. When you click Command1, a document is opened into an ADO recordset. A record object is used to
retrieve the Recordset row that contains the document. When you click Command2, a document is opened directly into an ADO record object. In both
cases, a stream object is opened on a record. Because a stream is a file in
memory, you can perform actions such as displaying the file. Note To be visible to ADO, the documents must reside in an Internet Information Server's virtual directory. The server should be running Microsoft Windows 2000 or later and Internet Information Server 5.0 or later. The client must have Internet Explorer 5 or later installed. The following sample uses a document that is named Test.txt in a virtual directory that is named Test. The virtual directory may contain other folders and documents.
REFERENCES For a more advanced sample that uses ADO records and
streams to work with folders and documents, visit the following
Microsoft Developer Network Web site: Internet Publishing scenario The Internet Publishing Scenario is
also available in the MSDN Library. In the MSDN Library Index, search for the following: http://msdn.microsoft.com/en-us/library/ms675339(VS.85).aspx (http://msdn.microsoft.com/en-us/library/ms675339(VS.85).aspx) Internet Publishing scenario(ADO). 245359
(http://support.microsoft.com/kb/245359/
)
How to open documents by using the Internet Publishing Provider
For more infomation about Microsoft ActiveX
Data Objects, visit the following MSDN Web site:http://msdn.microsoft.com/en-us/library/ms675532(VS.85).aspx
(http://msdn.microsoft.com/en-us/library/ms675532(VS.85).aspx)
| Article Translations
|
Back to the top
