To get
results that are identical to the ADO Connection object "Mode" property,
you set a particular DBPROP_INIT_MODE bit mask. The following table
lists the one-to-one correspondence between the values of the ADO
Connection object ConnectModeEnum constants (the "Mode" property names)
and the bit masks defined for the OLE DB DBPROP_INIT_MODE data source
property.
ADO "Mode" Properties and Corresponding DBPROP_INIT_MODE Bit
Masks
|
DBPROP_INIT_MODE
Bit Mask
|
|
|
|
|
|
|
|
|
|
|
|
DB_MODE_SHARE_DENY_EXCLUSIVE
|
|
|
|
|
When you
set a particular DBPROP_INIT_MODE bit mask value, it has the same
effect as when you the ADO Connection object "Mode" property to the
corresponding ConnectModeEnum value, as shown in the following table:
How OLE DB ModeProperty Values Are Implemented
DBPROP_INIT_MODE Bit
Mask Set
|
DBPROP_INIT_MODE
Bit Mask Used
|
|
DB_MODE_SHARE_DENY_READ,
DB_MODE_SHARE_DENY_WRITE, or DB_MODE_SHARE_DENY_EXCLUSIVE
|
|
A client cannot
prevent other clients from connecting to a server.
|
|
|
You cannot open
a connection that is limited only to write operations. Reading data
is always supported.
|
|
|
Use of DB_MODE_READ
bit without the DB_MODE_WRITE bit restricts open rowsets to read-only
access. Read-only rowsets do not implement the IRowsetChange and IRowsetUpdate
interfaces.
|