Subscribe to Windows IT Pro
June 04, 2008 12:00 AM

Specifying Alternate ADO Credentials

Windows IT Pro
InstantDoc ID #98915
Rating: (0)

By default, ActiveX Data Objects (ADO) searches Active Directory (AD) using the currently logged-on user's credentials. If you need to specify alternate credentials, configure the User ID, Password, and Encrypt Password properties on the Command object. Use the same syntax to set these properties on the Command object as you would when configuring the Connection object, as in the following code:

 

Command.Properties.Item("User ID") = "Administrator"
Command.Properties.Item("Password") = "password"
Command.Properties.Item("Encrypt Password") = True

 

For more information about setting alternate credentials and using ADO to search AD, see Microsoft’s Searching with ActiveX Data Objects (ADO) Web page at http://msdn2.microsoft.com/en-us/library/aa746471.aspx.

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.