Solved

ADODB.Connection open return code

Posted on 2003-10-21
2
668 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now