SQLVDir Object

XML and Internet Support

XML and Internet Support

SQLVDir Object

The SQLVDir object is a virtual directory object obtained by calling the Item method (or by calling the AddVirtualDirectory method if you are creating a new virtual directory).

The SQLVDir object supports the following properties. You can get and set values for all of these properties except the Password property (for which you can set, but cannot get, the value).

Name property

Is the name of the virtual directory.

PhysicalPath property

Is the full physical path to the directory associated with the virtual directory.

ServerName property

Is the name of the server running Microsoft® SQL Server™ 2000, which is the data source for the virtual directory.

DatabaseName property

Is the default database used in queries against this virtual directory.

UserName property

Is the user login that is used to connect to the data source.

Password property

Is the user password that is used to connect to the data source.

SecurityMode property

Is the login authentication method that is used with the virtual directory, such as SQL Authentication or Windows Integrated Authentication. You can specify one of these values.

Value Description
1 SQL Server login
2 Microsoft Windows® anonymous login
4 Basic authentication
8 Windows Integrated Authentication

Caution  If you are changing the connection settings (changing server name, database name, user name, password or the security mode), it is recommended that the virtual directory access be disallowed. The virtual directory can be disabled by setting the AllowFlags property to 0.

AllowFlags property

Provides the type of access allowed through this virtual directory. You can specify one (or a combination) of these values.

Value Description
1 URL queries
8 Template access
64 XPath queries

EnablePasswordSync property

Specifies whether Microsoft® Internet Information Services (IIS) is allowed to handle the anonymous password synchronization.

DLLPath property

Provides the full path to the Sqlisapi.dll.

AdditionalSettings property

Are user-defined settings appended to the OLE DB connection string.

The SQLVDir object also supports this method:

VirtualNames method

Is the collection of virtual name mappings for the virtual directory.

Examples

This example establishes a connection to the first Web site on an IIS server. The first virtual directory object (index 0) on the connected Web site is accessed. The PhysicalPath property of the object is set to C:\inetpub.

Set ObjXML = CreateObject("SQLVDir.SQLVDirControl")
ObjXML.Connect "IISServer", "1"
Set ObjVDirs = ObjXML.SQLVDirs
Set ObjVDir = ObjVDirs.Item(0)
ObjVDir.PhysicalPath = "C:\"
ObjVDir.PhysicalPath = ObjVDir.PhysicalPath & "inetpub"
...
ObjXML.Disconnect