Solved

ADODB.Connection open return code

Posted on 2003-10-21
2
693 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

717 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