VirtualNames Collection Object

XML and Internet Support

XML and Internet Support

VirtualNames Collection Object

The VirtualNames collection object is a collection of virtual names in the virtual directory object (SQLVDir object). The VirtualNames collection object is similar to the SQLVDirs object (which is a collection of virtual root objects). The VirtualNames collection object supports these standard methods:

Next method

Retrieves the next virtual name (or names). An integer specified for Next determines the number of virtual names to retrieve.

Skip method

Skips the virtual name (or names). A number specified for Skip determines how many virtual names to skip.

Reset method

Resets the collection index to the first virtual name.

Clone method

Returns a copy of the VirtualNames collection object.

Count method

Returns the number of virtual names.

Item method

Retrieves one virtual name. You can specify an integer (starting with 0 for the first virtual directory) or the name of the virtual name.

The VirtualNames collection object also supports these methods:

AddVirtualName method

Passes the name of the virtual name, type of the virtual name, and the directory path associated with the virtual name to create. The AddVirtualName method or Item method returns an interface to a VirtualName object that represents the virtual name.

RemoveVirtualName method

Removes the virtual name that is specified.

Examples

This example shows the steps for accessing a VirtualNames collection object.

Set ObjXML = CreateObject("SQLVDir.SQLVDirControl")
ObjXML.Connect "IISServer", "1"
Set ObjVDirs = ObjXML.SQLVDirs
Set ObjVDir = ObjVDirs.Item(0)
Set ObjNames = ObjVdir.VirtualNames
...
ObjXML.Disconnect