VirtualName Object

XML and Internet Support

XML and Internet Support

VirtualName Object

The VirtualName object is obtained by calling the Item method (or by calling the AddVirtualName method if you are creating a new virtual name).

The VirtualName object supports these properties:

Name property

Is the name of the virtual name that is being created.

Type property

Is the virtual name type. You can specify one of these values.

Value Description
1 Virtual name of type dbobject.
2 Virtual name of type schema.
4 Virtual name of type template.

Path property

Is the directory path (absolute or relative) associated with the virtual name.

Examples

This example shows the steps for accessing an existing VirtualName object and for setting some of its attributes.

Set ObjXML = CreateObject("SQLVDir.SQLVDirControl")
ObjXML.Connect "IISServer", "1"
Set ObjVDirs = ObjXML.SQLVDirs
Set ObjVDir = ObjVDirs.Item(0)
Set ObjNames = ObjVdir.VirtualNames
Set ObjVName1 = ObjNames.Item(0)
ObjVName1.Type = 2
ObjVName1.Name = "MySchema"
ObjVName1.Path = "C:\inetpub\schema"
...
ObjXML.Disconnect

This statement creates a new virtual name:

Set NewVName = ObjNames.AddVirtualName "MyNewSchema", 2, "C:\inetpub\schema"