Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SQLVDirs Collection Object

SQL Server 2000

The SQLVDirs collection object is returned by the SQLVDirControl.SQLVDirs method. With the SQLVDirs collection object, you can access a specific virtual directory (using the Item method), create a new virtual directory (using the AddVirtualDirectory method), or remove an existing virtual directory (using the RemoveVirtualDirectory method).

The SQLVDirs collection object supports these standard methods:

Next method

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

Skip method

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

Reset method

Resets the collection index to the first virtual directory.

Clone method

Returns a copy of the SQLVDirs collection object.

Count method

Returns the number of virtual directories.

Item method

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

The SQLVDirs collection object also supports these methods:

AddVirtualDirectory method

Takes the name of the virtual directory to create. This method creates a new virtual directory in the metabase with all the defaults. However, some properties, like the default database are not set.

The AddVirtualDirectory method or Item method returns a SQLVDir object that represents the virtual directory.

RemoveVirtualDirectory method

Removes the virtual directory from the Microsoft® Internet Information Sevices (IIS) metabase.

Examples

This example establishes a connection to the first Web site on an IIS server. The first virtual directory object (index value 0) on the connected Web site is accessed.

Set ObjXML = CreateObject("SQLVDir.SQLVDirControl")
ObjXML.Connect "IISServer", "1"
Set ObjVDirs = ObjXML.SQLVDirs
Set ObjVDir = ObjVDirs.Item(0)
' or ObjVDirs(0) since Item() is the default
...
ObjXML.Disconnect
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.