StorageType Property  
 

Gets the current storage container type identifier.

Syntax

object.StorageType

Remarks

This property returns an integer value which identifies the current storage container type. It may be one of the following values. If no storage container is currently open, this property will return a value of zero.

Value Constant Description
1 webStorageGlobal Global storage. Objects stored using this storage type are available to all users. Any changes made to objects using this storage type will affect all users of the application. Unless there is a specific need to limit access to the objects stored by the application to specific domains, local machines or users, it is recommended that you use this storage type when creating new objects.
2 webStorageDomain Local domain storage. Objects stored using this storage type are only available to users in the same local domain, as defined by the domain name or workgroup name assigned to the local system. If the domain or workgroup name changes, objects previously stored using this storage type will not be available to the application.
3 webStorageMachine Local machine storage. Objects stored using this storage type are only available to users on the same local machine. The local machine is identified by unique characteristics of the system, including the boot volume GUID. Objects previously stored using this storage type will not be available on that system if the boot disk is reformatted.
4 webStorageUser Current user storage. Objects stored using this storage type are only available to the current user logged in on the local machine. The user identifier is based on the Windows user SID that is assigned when the user account is created. If the user account is deleted, the objects previously stored using this storage type will not be available to the application.

The storage type specifies the type of container that objects will be stored in. You can think of the storage containers as special folders which store individual objects. In most cases, we recommend using webStorageGlobal which means that stored objects will be accessible to all users of your application. However, you can limit access to the stored objects based on the local domain, local machine ID or the current user SID.

If you specify anything other than global storage, objects can be orphaned if the system configuration changes. For example, if webStorageMachine is specified, the objects that are stored there can only be accessed from that computer system. If the system is reconfigured (for example, the boot volume formatted and Windows is reinstalled) the unique identifier for that system will change and the previous objects that were stored by your application can no longer be accessed.

It is advisable is to store critical application data and configuration information using webStorageGlobal and use other non-global storage containers for configuration information that is unique to that system and/or user which is not critical and can be easily recreated.

Data Type

Integer

See Also

StorageId Property, Open Method