Version: 2.5
Sets or returns a ConnectModeEnum value that specifies the available permissions for modifying data.
The Mode property sets or returns a ConnectModeEnum constant that
dictates the access permissions for a Stream object.
If the access mode is not set, it will be inherited from the source that is used to
open the Stream.
There are two possible default values for this property.
The default for a Stream associated with an underlying data source is adReadOnly.
While the default for a Stream that is not associated with an underlying data source
is adModeUnknown.
This property is read-only if the Stream object is open and read/write if closed.
ConnectModeEnum Constants
Constant | Value | Description |
---|---|---|
adModeRead | 1 | Read-only permission |
adModeReadWrite | 3 | Read/write permission |
adModeRecursive | 0x400000 | Sets permissions for children of the Record. Must use with either: 1. adModeShareDenyRead, 2. or adModeShareDenyWrite, 3. or adModeShareDenyNone plus any one of adModeRead, adModeReadWrite, or adModeWrite |
adModeShareDenyNone | 16 | Other users can open a connection with all permissions |
adModeShareDenyRead | 4 | No other user can open a connection with read permission |
adModeShareDenyWrite | 8 | No other user can open a connection with write permission |
adModeShareExclusive | 12 | No other user can open a connection |
adModeUnknown | 0 | Default, permission not set or determined |
adModeWrite | 2 | Write-only permissions |
objStream.Mode = adModeWrite