Solved

ADODB.Connection open return code

Posted on 2003-10-21
2
684 Views
Last Modified: 2007-12-19
Hi Experts,

In the following code, I am trying to get connection to the active directory as well as authenticating the user by giving the user's credentials.


Dim conn As New ADODB.Connection
Dim cmd As New ADODB.Command

conn.Provider = "ADsDSObject"
conn.Open "Active Directory Provider", username, password   ' --> username and password are declared globally


If either or both username and password is incorrect, then will the above statement return any error or error code that I can capture.

If this is a bad idea to authenticate users, then can you please suggest another solution where I can authenticate the user as well as get that user's information from the active directory, with a more generic base url or connection string to connect to the active directory.

Plumppudding
0
Comment
Question by:Plumppudding
2 Comments
 
LVL 5

Expert Comment

by:fantasy1001
ID: 9597637
0
 
LVL 3

Accepted Solution

by:
pg_india earned 20 total points
ID: 9619182
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question