RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
ADODB.TConnectMode Enumeration

TConnectMode values indicate the persimissions available to a connection.

Pascal
TConnectMode = (
  cmUnknown,
  cmRead,
  cmWrite,
  cmReadWrite,
  cmShareDenyRead,
  cmShareDenyWrite,
  cmShareExclusive,
  cmShareDenyNone
);
C++
enum TConnectMode {
  cmUnknown,
  cmRead,
  cmWrite,
  cmReadWrite,
  cmShareDenyRead,
  cmShareDenyWrite,
  cmShareExclusive,
  cmShareDenyNone
};

Use TConnectMode values to determine the permissions available to a connection and thus what type of data operations can be performed through that connection. 

TConnectMode constants correspond directly to the ConnectModeEnum values for the Mode property of the ADO Connection object. The TConnectMode constants have the same effect on a TADOConnection component as the ConnectModeEnum values have on the Connection object. These values are discussed in the Microsoft Data Access SDK help. 

TConnectMode consists of the eight constants summarized in the following table:

Connect Mode 
Meaning 
cmUnknown  
The permissions have not yet been 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.  

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!