Microsoft ActiveX Data ObjectsMicrosoft ActiveX Data Objects*
*Contents  *Index  *Topic Contents

Microsoft OLE DB Provider for Microsoft Active Directory Service

The Microsoft® Active Directory Service Interfaces (ADSI) Provider Version 1.0 allows ADO to access heterogeneous directory services through ADSI. This gives ADO applications read-only access to the Microsoft Windows NT® 4.0 directory services, as well as to any LDAP compliant directory service and Novell Directory Services. ADSI itself is based on a provider model, so if there is a new provider giving access to another directory, the ADO application will be able to access it seamlessly. The ADSI provider is free-threaded and unicode-enabled.

Connection String Parameters

To connect to this provider, set the Provider argument of the ConnectionString property to

ADSDSOObject

Reading the Provider property will return this string as well.

Command Text

The provider recognizes a four-part command text string in the following syntax:

"Root; Filter; Attributes[; Scope]"
Value Description
Root The ADsPath object from which the search is to be started (that is, the root of the search).
Filter The search filter in the RFC 960 format.
Attributes A comma-delimited list of attributes to be returned.
Scope Optional. A String that specifies the scope of the search. Can be one of the following:
  • Base — Search only the base object (Root of the search)

  • OneLevel — Search only one level

  • Subtree — Search the entire subtree.

The provider does not accept stored procedure calls or simple table names (for example, the CommandType property will always be adCmdText). See the ADSI documentation for a more complete description of the command text elements.

Recordset Behavior

The following tables list the features available with on a Recordset object opened with this provider. Only the Static cursor type (adOpenStatic) is available.

For more detailed information about Recordset behavior for your provider configuration, run the Supports method, and enumerate the Properties collection of the Recordset to determine whether provider-specific dynamic properties are present.

Availability of standard ADO Recordset properties:
AbsolutePage read/write
AbsolutePosition read/write
ActiveConnection read-only
BOF read-only
Bookmark read/write
CacheSize read/write
CursorLocation always adUseServer
CursorType always adOpenStatic
EditMode always adEditNone
EOF read-only
Filter read/write
LockType read/write
MarshalOptions not available
MaxRecords read/write
PageCount read-only
PageSize read/write
RecordCount read-only
Source read/write
State read-only
Status read-only

Availability of standard ADO Recordset methods:
AddNew No
CancelBatch No
CancelUpdate No
Clone Yes
Close Yes
Delete No
GetRows Yes
Move Yes
MoveFirst Yes
MoveLast Yes
MoveNext Yes
MovePrevious Yes
NextRecordset Yes
Open Yes
Requery Yes
Resync Yes
Supports Yes
Update No
UpdateBatch No

For more information about ADSI in general and the specifics of the provider, please refer to the documentation provided in the ADSI SDK. The SDK can be installed from the ADSI Web Page.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.