Solved

ADODB.Connection open return code

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

896 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

14 Experts available now in Live!

Get 1:1 Help Now