The Microsoft Internet Publishing Provider, MSDAIPP.dso, can be used to retrieve documents located in Internet Information Server (IIS) Virtual Directories. The provider can return a Recordset containing all the files in the directory, or a Record object that refers to a single file. You can use the ADO Stream object to read and write to the file if you have appropriate permissions on the server.
This article demonstrates how to successfully make a connection using the MSDAIPP.dso provider and retrieve objects.
MDAC 2.5 allows the MSDAIPP.dso provider to be invoked both explicitly and implicitly. If you invoke it explicitly, you must provide both the Provider and Data Source arguments when connecting. To invoke it implicitly, the connect string must begin with URL=. Using URL= is known as Direct Binding or specifying a Root Binder.
Most examples are shown using indirect binding, though you can also use the explicit syntax in any of the scenarios.
To locate a document, you must specify a URL (the Data Source is also a URL) and a relative path off the URL. The former is known as an Absolute URL; the latter a relative URL. A combination of the two forms a Complete URL.
The following examples illustrate various ways of opening Connection, Recordset, Record, and Stream objects. For purposes of the examples, the complete URL to the document is http://server/docs/mydocs/myfile.txt.
The MSDAIPP.dso provider only returns a Read-only, Forward-only cursor.
Opening a Recordset on a directory:
To retrieve a list of documents in a path, open the Recordset on a connection without specifying a relative URL to a document. You must have permissions in IIS to browse the directory or the provider returns an empty Recordset.
Opening a Recordset based on a Record object:
You can use the GetChildren method of a Record object opened on a directory to populate a Recordset of file names.
rec.Open "docs/mydocs", "URL=http://server"
Set rs = rec.GetChildren
Record Object
You can open a Record object directly on a directory or a document. You can also open a Record based on the current record of a Recordset.