Indicating the Types of Operations the Connection Supports
Go Up to Fine-tuning a Connection
ADO connections are established using a specific mode, similar to the mode you use when opening a file. The connection mode determines the permissions available to the connection, and hence the types of operations (such as reading and writing) that can be performed using that connection.
Use the Mode property to indicate the connection mode. The possible values are listed in the following table:
ADO connection modes :
Connect Mode | Meaning |
---|---|
cmUnknown |
Permissions are not yet set for the connection or cannot be determined. |
cmRead |
Read-only permissions are available to the connection. |
cmWrite |
Write-only permissions are available to the connection. |
cmReadWrite |
Read/write permissions are available to the connection. |
cmShareDenyRead |
Prevents others from opening connections with read permissions. |
cmShareDenyWrite |
Prevents others from opening connection with write permissions. |
cmShareExclusive |
Prevents others from opening connection. |
cmShareDenyNone |
Prevents others from opening connection with any permissions. |
The possible values for Mode correspond to the ConnectModeEnum values of the Mode property on the underlying ADO connection object. See the Microsoft Data Access SDK help for more information on these values.