ADO Connection Error (1 Viewer)

modest

Registered User.
Local time
Yesterday, 19:41
Joined
Jan 4, 2005
Messages
1,220
I get this error (in the attachment) when I open my ADO connection.


My code is as follows.
Dim con As ADODB.Connection

'set the connection
Set con = New ADODB.Connection
With con
.Provider = "ADSDSOObject"
.Open "ADs Provider" 'ADSI
End With

The error comes on the .Open line. I've tried:
.Open
.Open "ADSI"
.Open "ADs Provider"

Note that this error does not produce a messagebox, I just noticed it while I was doing some debugging. Also, I think the error is associated with the provider hence the "Provider does not support this property."
 

Attachments

  • NativeError.jpg
    NativeError.jpg
    55.8 KB · Views: 139
Last edited:

Travis

Registered User.
Local time
Yesterday, 16:41
Joined
Dec 17, 1999
Messages
1,332
You are not getting an error, because an Error did not occur. This issue is that the Provider you choose does not have those properties therefore the connection variable cannot display them.

However, the question really comes down to what comes after the connection. Do you get data? You are accessing the ADSI (Active Directory). But you are not displaying what command you are sending.
 

modest

Registered User.
Local time
Yesterday, 19:41
Joined
Jan 4, 2005
Messages
1,220
http://www.access-programmers.co.uk/forums/showthread.php?t=82777
Most of my code is there.


My problem is that I'm having difficulties getting the properties from my LDAP, instead of getting a string, the value is either an '11' or a '3'. I'm just having difficulty getting it to work, but I may have found an answer tonight when I came home. I'll test it out tomorrow.

In any case, I don't like error messages and I don't suppose it's a good thing that the provider doesn't recognize the property, so how would you suggest I go about curing this sick code?
 

Users who are viewing this thread

Top Bottom