Hi All,
Does anyone know how to query an LDAP server from Access VBA that is not
a Microsoft / Active Directory (AD) server? I have found a lot of stuff
about how to query AD and have succeeded in doing so. But that does not seem
to transfer to the non-MS LDAP server. It gives the error "Automation error"
"There is no such object on the server."
Thanks,
Clifford Bass
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/201004/1
|
|
0
|
|
|
|
Reply
|
Clifford
|
4/27/2010 8:52:41 PM |
|
Clifford
Is there a chance that there's a ODBC driver for the non-AD data store?
Regards
Jeff Boyce
Microsoft Access MVP
--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.
Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.
You can thank the FTC of the USA for making this disclaimer
possible/necessary.
"Clifford Bass via AccessMonster.com" <u48370@uwe> wrote in message
news:a72c5c8e8d52e@uwe...
> Hi All,
>
> Does anyone know how to query an LDAP server from Access VBA that is
> not
> a Microsoft / Active Directory (AD) server? I have found a lot of stuff
> about how to query AD and have succeeded in doing so. But that does not
> seem
> to transfer to the non-MS LDAP server. It gives the error "Automation
> error"
> "There is no such object on the server."
>
> Thanks,
>
> Clifford Bass
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/201004/1
>
|
|
0
|
|
|
|
Reply
|
Jeff
|
4/27/2010 9:58:20 PM
|
|
Hi Jeff,
Good thought! But no :-(
Clifford Bass
Jeff Boyce wrote:
>Clifford
>
>Is there a chance that there's a ODBC driver for the non-AD data store?
>
>Regards
>
>Jeff Boyce
>Microsoft Access MVP
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/201004/1
|
|
0
|
|
|
|
Reply
|
Clifford
|
4/27/2010 10:14:55 PM
|
|
ADSI OLEDB will query any LDAP server provided you can
get the connection and authentication right. Can you query
LDAP using something like ldapsearch?
How is the data stored? Are you able to query
the database using ODBC rather than LDAP?
(david)
"Clifford Bass via AccessMonster.com" <u48370@uwe> wrote in message
news:a72c5c8e8d52e@uwe...
> Hi All,
>
> Does anyone know how to query an LDAP server from Access VBA that is
> not
> a Microsoft / Active Directory (AD) server? I have found a lot of stuff
> about how to query AD and have succeeded in doing so. But that does not
> seem
> to transfer to the non-MS LDAP server. It gives the error "Automation
> error"
> "There is no such object on the server."
>
> Thanks,
>
> Clifford Bass
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/201004/1
>
|
|
0
|
|
|
|
Reply
|
david
|
4/28/2010 2:13:44 AM
|
|
Hi David,
The local departmental one is just a huge text file with some sort of
tagged field format. I do not know about the organizational one; however
that is less of a concern. There are no ODBC drivers for the local one. So
ODBC is not an option.
If I do an ldpasearch it works; i.e.:
ldapsearch -h ldap.dept.org.com "sn=bass"
correctly finds and displays my information.
Here is the code that works with Active Directory.
Public Function SearchDirectory( _
ByVal strLastName As String, _
strFirstName As String) _
As String
Dim cnnAD As ADODB.Connection
Dim rstAD As ADODB.Recordset
Dim intCount As Integer
Dim objADsUser As Object
Dim objDS As Object
Dim objIADS As Object
Dim strReturn As String
Dim strSQL As String
On Error GoTo Handle_Error
SearchDirectory = "*** Not Found ***"
If strLastName <> vbNullString And _
strFirstName <> vbNullString Then
Set objDS = GetObject("LDAP://rootDSE")
'Debug.Print objDS.Get("defaultNamingContext")
Set objIADS = GetObject("LDAP://" & _
objDS.Get("defaultNamingContext"))
'Debug.Print objIADS.ADSPath
Set cnnAD = New ADODB.Connection
With cnnAD
.Open "Provider=ADsDSOObject"
strSQL = _
"select ADsPath " & _
"from '" & objIADS.ADSPath & "' " & _
"where displayName='" & Replace( _
strFirstName, "'", "''") & "*" & _
Replace(strLastName, "'", "''") & _
"' and objectClass = 'user' and " & _
"cn <> 'systemmailbox*'"
Set rstAD = .Execute(strSQL)
With rstAD
intCount = 0
Do While Not .EOF
If intCount > 0 Then
strReturn = strReturn & ", "
End If
'Debug.Print .Fields(0).Value
Set objADsUser = GetObject( _
.Fields(0).Value)
strReturn = strReturn & _
objADsUser.displayName
intCount = intCount + 1
.MoveNext
Loop
.Close
If intCount > 0 Then
SearchDirectory = intCount & _
": " & strReturn
End If
End With
.Close
End With
End If
Exit_Function:
On Error Resume Next
Set objADsUser = Nothing
Set objDS = Nothing
Set objIADS = Nothing
If Not cnnAD Is Nothing Then
If Not rstAD Is Nothing Then
If rstAD.State <> _
ADODB.ObjectStateEnum.adStateClosed _
Then
rstAD.Close
End If
Set rstAD = Nothing
End If
If cnnAD.State <> _
ADODB.ObjectStateEnum.adStateClosed _
Then
cnnAD.Close
End If
Set cnnAD = Nothing
End If
Exit Function
Handle_Error:
SearchDirectory = "Error #" & Err.Number & _
": " & Err.DESCRIPTION
Resume Exit_Function
End Function
The local LDAP server does not require authentication. I tried various
substituations in the "Set objDS = GetObject("LDAP://rootDSE")" line without
success (usually automation errors).
GetObject("LDAP://ldap.dept.org.com")
GetObject("LDAP://ldap.dept.org.com/root")
GetObject("LDAP://ldap.dept.org.com/rootDSE")
Any suggestions?
Thanks,
Clifford Bass
david wrote:
>ADSI OLEDB will query any LDAP server provided you can
>get the connection and authentication right. Can you query
>LDAP using something like ldapsearch?
>
>How is the data stored? Are you able to query
>the database using ODBC rather than LDAP?
>
>(david)
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/201004/1
|
|
0
|
|
|
|
Reply
|
Clifford
|
4/28/2010 5:42:35 PM
|
|
Do you know what line the error is coming from?
I would have thought "no such object on the server" might have
happened if there was no defaultNamingContext object on the
server at the line:
objDS.Get("defaultNamingContext"))
or at any later stage when there was no such object on the server
-- not a VBA LDAP problem, just a problem working out what
the structure of your database is. It may not have a top level
attribute "defaultNamingContext" -
although I actually get "No such property in the cache" for that
when I query "directory.verisign.com"
(david)
"Clifford Bass via AccessMonster.com" <u48370@uwe> wrote in message
news:a737465e0fed3@uwe...
> Hi David,
>
> The local departmental one is just a huge text file with some sort of
> tagged field format. I do not know about the organizational one; however
> that is less of a concern. There are no ODBC drivers for the local one.
> So
> ODBC is not an option.
>
> If I do an ldpasearch it works; i.e.:
>
> ldapsearch -h ldap.dept.org.com "sn=bass"
>
> correctly finds and displays my information.
>
> Here is the code that works with Active Directory.
>
>
> Public Function SearchDirectory( _
> ByVal strLastName As String, _
> strFirstName As String) _
> As String
>
> Dim cnnAD As ADODB.Connection
> Dim rstAD As ADODB.Recordset
> Dim intCount As Integer
> Dim objADsUser As Object
> Dim objDS As Object
> Dim objIADS As Object
> Dim strReturn As String
> Dim strSQL As String
>
> On Error GoTo Handle_Error
>
> SearchDirectory = "*** Not Found ***"
> If strLastName <> vbNullString And _
> strFirstName <> vbNullString Then
> Set objDS = GetObject("LDAP://rootDSE")
> 'Debug.Print objDS.Get("defaultNamingContext")
> Set objIADS = GetObject("LDAP://" & _
> objDS.Get("defaultNamingContext"))
> 'Debug.Print objIADS.ADSPath
> Set cnnAD = New ADODB.Connection
> With cnnAD
> .Open "Provider=ADsDSOObject"
> strSQL = _
> "select ADsPath " & _
> "from '" & objIADS.ADSPath & "' " & _
> "where displayName='" & Replace( _
> strFirstName, "'", "''") & "*" & _
> Replace(strLastName, "'", "''") & _
> "' and objectClass = 'user' and " & _
> "cn <> 'systemmailbox*'"
> Set rstAD = .Execute(strSQL)
> With rstAD
> intCount = 0
> Do While Not .EOF
> If intCount > 0 Then
> strReturn = strReturn & ", "
> End If
> 'Debug.Print .Fields(0).Value
> Set objADsUser = GetObject( _
> .Fields(0).Value)
> strReturn = strReturn & _
> objADsUser.displayName
> intCount = intCount + 1
> .MoveNext
> Loop
> .Close
> If intCount > 0 Then
> SearchDirectory = intCount & _
> ": " & strReturn
> End If
> End With
> .Close
> End With
> End If
>
> Exit_Function:
> On Error Resume Next
>
> Set objADsUser = Nothing
> Set objDS = Nothing
> Set objIADS = Nothing
>
> If Not cnnAD Is Nothing Then
> If Not rstAD Is Nothing Then
> If rstAD.State <> _
> ADODB.ObjectStateEnum.adStateClosed _
> Then
> rstAD.Close
> End If
> Set rstAD = Nothing
> End If
>
> If cnnAD.State <> _
> ADODB.ObjectStateEnum.adStateClosed _
> Then
> cnnAD.Close
> End If
> Set cnnAD = Nothing
> End If
>
> Exit Function
>
> Handle_Error:
> SearchDirectory = "Error #" & Err.Number & _
> ": " & Err.DESCRIPTION
> Resume Exit_Function
>
> End Function
>
>
> The local LDAP server does not require authentication. I tried
> various
> substituations in the "Set objDS = GetObject("LDAP://rootDSE")" line
> without
> success (usually automation errors).
>
> GetObject("LDAP://ldap.dept.org.com")
> GetObject("LDAP://ldap.dept.org.com/root")
> GetObject("LDAP://ldap.dept.org.com/rootDSE")
>
> Any suggestions?
>
> Thanks,
>
> Clifford Bass
>
> david wrote:
>>ADSI OLEDB will query any LDAP server provided you can
>>get the connection and authentication right. Can you query
>>LDAP using something like ldapsearch?
>>
>>How is the data stored? Are you able to query
>>the database using ODBC rather than LDAP?
>>
>>(david)
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/201004/1
>
|
|
0
|
|
|
|
Reply
|
david
|
4/29/2010 5:16:38 AM
|
|
Hi David,
There are several different errors and a couple different locations
depending on what values I try. Here is some testing code and the results:
======================================
Public Sub TestLDAP1()
TestLDAP2 "LDAP://rootDSE"
TestLDAP2 "LDAP://ldap2.vetmed.wisc.edu"
TestLDAP2 "LDAP://ldap2.vetmed.wisc.edu/root"
TestLDAP2 "LDAP://ldap2.vetmed.wisc.edu/rootDSE"
End Sub
Public Sub TestLDAP2(ByVal strLDAP)
Const cstrDNC As String = "defaultNamingContext"
Dim objDS As Object
Dim strDNCValue As String
On Error Resume Next
Debug.Print
Debug.Print "Testing " & strLDAP
Set objDS = GetObject(strLDAP)
If Err.Number = 0 Then
Debug.Print "Successfully got """ & strLDAP & _
""" object."
strDNCValue = objDS.Get(cstrDNC)
If Err.Number = 0 Then
Debug.Print "Successfully got """ & cstrDNC & _
""" string; value = """ & strDNCValue & """"
Else
Debug.Print "Unable to get """ & cstrDNC & _
""" string."
Debug.Print "Error #" & Err.Number & ": " & _
Err.DESCRIPTION
Err.Clear
End If
Else
Debug.Print "Unable to get """ & strLDAP & _
""" object."
Debug.Print "Error #" & Err.Number & ": " & _
Err.DESCRIPTION
Err.Clear
End If
End Sub
======================================
Testing LDAP://rootDSE
Successfully got "LDAP://rootDSE" object.
Successfully got "defaultNamingContext" string; value = "DC=dept,DC=org,
DC=com"
Testing LDAP://ldap.dept.org.com
Successfully got "LDAP://ldap.dept.org.com" object.
Unable to get "defaultNamingContext" string.
Error #-2147417848: Automation error
The object invoked has disconnected from its clients.
Testing LDAP://ldap.dept.org.com/root
Unable to get "LDAP://ldap.dept.org.com/root" object.
Error #-2147016555: Automation error
A directory service error has occurred.
Testing LDAP://ldap.dept.org.com/rootDSE
Successfully got "LDAP://ldap.dept.org.com/rootDSE" object.
Unable to get "defaultNamingContext" string.
Error #-2147463155: The directory property cannot be found in the cache.
======================================
Interestingly, if I cut through all the detail and look directly at what
goes into the select statement I find for the Active Directory version:
select ADsPath
from 'LDAP://DC=dept,DC=org,DC=com'
where displayName='Clifford*Bass' and objectClass = 'user'
and cn <> 'systemmailbox*'
This of course executes just fine and returns a recordset. I can change
it to this and it will still work:
select ADsPath
from 'LDAP://DC=dept,DC=org,DC=com'
where sn='Bass' and objectClass = 'person'
However, if I follow the pattern and add another DC that presumedly
should get it to use the other LDAP server I get an error:
select ADsPath
from 'LDAP://DC=ldap,DC=dept,DC=org,DC=com'
where sn='Bass' and objectClass = 'person'
Error #-2147217865: Table does not exist.
Thanks for your time; it is appreciated!
Clifford Bass
david wrote:
>Do you know what line the error is coming from?
>
>I would have thought "no such object on the server" might have
>happened if there was no defaultNamingContext object on the
>server at the line:
>
> objDS.Get("defaultNamingContext"))
>
>or at any later stage when there was no such object on the server
>-- not a VBA LDAP problem, just a problem working out what
>the structure of your database is. It may not have a top level
>attribute "defaultNamingContext" -
>
>although I actually get "No such property in the cache" for that
>when I query "directory.verisign.com"
>
>(david)
--
Message posted via http://www.accessmonster.com
|
|
0
|
|
|
|
Reply
|
Clifford
|
4/29/2010 5:26:55 PM
|
|
None of those examples seem to be the example you tested with:
ldapsearch -h ldap.dept.org.com "sn=bass"
So I'm not sure if you are happy yet:~)
In any case, if you can get rootDSE (which I think means that you
are querying an LDAP 3.0 database), then you should be able to
read what the default naming context is called. If not, you should
be able to just query "sn=bass" (which is clearly in the default naming
context, what ever it is called)
I don't understand this at all:
> However, if I follow the pattern and add another DC that presumedly
> should get it to use the other LDAP server I get an error:
I don't see how adding another DC would get one LDAP server to
query another LDAP server? Maybe in Active Directory, but not
in general.
(david)
"Clifford Bass via AccessMonster.com" <u48370@uwe> wrote in message
news:a743b6103eb70@uwe...
> Hi David,
>
> There are several different errors and a couple different locations
> depending on what values I try. Here is some testing code and the
> results:
>
> ======================================
> Public Sub TestLDAP1()
>
> TestLDAP2 "LDAP://rootDSE"
> TestLDAP2 "LDAP://ldap2.vetmed.wisc.edu"
> TestLDAP2 "LDAP://ldap2.vetmed.wisc.edu/root"
> TestLDAP2 "LDAP://ldap2.vetmed.wisc.edu/rootDSE"
>
> End Sub
>
> Public Sub TestLDAP2(ByVal strLDAP)
>
> Const cstrDNC As String = "defaultNamingContext"
>
> Dim objDS As Object
> Dim strDNCValue As String
>
> On Error Resume Next
>
> Debug.Print
> Debug.Print "Testing " & strLDAP
> Set objDS = GetObject(strLDAP)
> If Err.Number = 0 Then
> Debug.Print "Successfully got """ & strLDAP & _
> """ object."
> strDNCValue = objDS.Get(cstrDNC)
> If Err.Number = 0 Then
> Debug.Print "Successfully got """ & cstrDNC & _
> """ string; value = """ & strDNCValue & """"
> Else
> Debug.Print "Unable to get """ & cstrDNC & _
> """ string."
> Debug.Print "Error #" & Err.Number & ": " & _
> Err.DESCRIPTION
> Err.Clear
> End If
> Else
> Debug.Print "Unable to get """ & strLDAP & _
> """ object."
> Debug.Print "Error #" & Err.Number & ": " & _
> Err.DESCRIPTION
> Err.Clear
> End If
>
> End Sub
> ======================================
> Testing LDAP://rootDSE
> Successfully got "LDAP://rootDSE" object.
> Successfully got "defaultNamingContext" string; value = "DC=dept,DC=org,
> DC=com"
>
> Testing LDAP://ldap.dept.org.com
> Successfully got "LDAP://ldap.dept.org.com" object.
> Unable to get "defaultNamingContext" string.
> Error #-2147417848: Automation error
> The object invoked has disconnected from its clients.
>
> Testing LDAP://ldap.dept.org.com/root
> Unable to get "LDAP://ldap.dept.org.com/root" object.
> Error #-2147016555: Automation error
> A directory service error has occurred.
>
> Testing LDAP://ldap.dept.org.com/rootDSE
> Successfully got "LDAP://ldap.dept.org.com/rootDSE" object.
> Unable to get "defaultNamingContext" string.
> Error #-2147463155: The directory property cannot be found in the cache.
> ======================================
>
> Interestingly, if I cut through all the detail and look directly at
> what
> goes into the select statement I find for the Active Directory version:
>
> select ADsPath
> from 'LDAP://DC=dept,DC=org,DC=com'
> where displayName='Clifford*Bass' and objectClass = 'user'
> and cn <> 'systemmailbox*'
>
> This of course executes just fine and returns a recordset. I can
> change
> it to this and it will still work:
>
> select ADsPath
> from 'LDAP://DC=dept,DC=org,DC=com'
> where sn='Bass' and objectClass = 'person'
>
> However, if I follow the pattern and add another DC that presumedly
> should get it to use the other LDAP server I get an error:
>
> select ADsPath
> from 'LDAP://DC=ldap,DC=dept,DC=org,DC=com'
> where sn='Bass' and objectClass = 'person'
>
> Error #-2147217865: Table does not exist.
>
> Thanks for your time; it is appreciated!
>
> Clifford Bass
>
> david wrote:
>>Do you know what line the error is coming from?
>>
>>I would have thought "no such object on the server" might have
>>happened if there was no defaultNamingContext object on the
>>server at the line:
>>
>> objDS.Get("defaultNamingContext"))
>>
>>or at any later stage when there was no such object on the server
>>-- not a VBA LDAP problem, just a problem working out what
>>the structure of your database is. It may not have a top level
>>attribute "defaultNamingContext" -
>>
>>although I actually get "No such property in the cache" for that
>>when I query "directory.verisign.com"
>>
>>(david)
>
> --
> Message posted via http://www.accessmonster.com
>
|
|
0
|
|
|
|
Reply
|
david
|
5/3/2010 4:17:07 AM
|
|
Hi David,
Good thing to check. Makes no difference. Passing:
select ADsPath
from 'LDAP://DC=ldap,DC=dept,DC=org,DC=com'
where sn='Bass'
to the cnnAD.Execute gives me:
Error #-2147217865: Table does not exist.
In can be confusing. I am admittedly flying in the dark as I have not
found any helpful clues as how to do this with a non-MS LDAP server and am
trying to adapt code that works with Active Directory. Perhaps that is the
first mistake. Active Directory is at dept.org.com. The server I want to
query is at ldap.dept.org.com. My guess was that adding another DC would in
theory point it to the non-MS LDAP server.
Any clue as to how I can determine what the default naming context is
called? I have found some code for enumerating the mandatory and optional
properties available in an Active Directory. But again, it starts out:
' Connect to the LDAP server's root object
Set objRootDSE = GetObject("LDAP://RootDSE")
' Form a path to the root domain object
strADsPath = "LDAP://" & objRootDSE.Get("defaultNamingContext")
So I am stopped by the same issue in that it requires access
"defaultNamingContext" before it will get the properties.
Appreciate your efforts David!
Clifford Bass
david wrote:
>None of those examples seem to be the example you tested with:
>
> ldapsearch -h ldap.dept.org.com "sn=bass"
>
>So I'm not sure if you are happy yet:~)
>
>In any case, if you can get rootDSE (which I think means that you
>are querying an LDAP 3.0 database), then you should be able to
>read what the default naming context is called. If not, you should
>be able to just query "sn=bass" (which is clearly in the default naming
>context, what ever it is called)
>
>I don't understand this at all:
>
>> However, if I follow the pattern and add another DC that presumedly
>> should get it to use the other LDAP server I get an error:
>
>I don't see how adding another DC would get one LDAP server to
>query another LDAP server? Maybe in Active Directory, but not
>in general.
>
>(david)
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/201005/1
|
|
0
|
|
|
|
Reply
|
Clifford
|
5/3/2010 5:01:53 PM
|
|
According to your previous post:
>Testing LDAP://ldap.dept.org.com
>Successfully got "LDAP://ldap.dept.org.com" object.
So you have successfully connected to the LDAP
server at ldap.dept.org.com.
After that, it is only a question of what the structure
is and permissions are for that database.
rootDSE is a standard element for an LDAP 3.0
database, and you have successfully got that:
>Testing LDAP://ldap.dept.org.com/rootDSE
>Successfully got "LDAP://ldap.dept.org.com/rootDSE" object.
All LDAP 3.0 servers recognise these attribute names:
subschemaSubentry
namingContexts
supportedControl
supportedSASLMechanisms
supportedLDAPVersion
supportedExtension
altServer
(the attributes will be absent if they are empty)
Since you don't have a "DefaultNamingContext", because that is an Active
Directory Attribute, let's see what naming contexts you do have:
set objds = getobject("LDAP://ldap.dept.org.com/rootDSE")
vlist = objds.Get("namingContexts")
For each s in vlist
msgbox s
next
And query the first name Context:
set obj = getobject((LDAP://ldap.dept.org.com/"& vlist(0) )
msgbox obj.name
(david)
"Clifford Bass via AccessMonster.com" <u48370@uwe> wrote in message
news:a775c878282ff@uwe...
> Hi David,
>
|
|
0
|
|
|
|
Reply
|
david
|
5/4/2010 8:07:36 AM
|
|
Hi David,
That provides some, but limited progress. Only two of the attributes
are recognized and they are:
subschemaSubentry = "cn=schema"
nameContexts = ""
Does that mean it is not an LDAP 3.0 server? Obviously with a blank
nameContexts value, it does not enumerate any.
----Later...
Did some online searching on those attributes and discovered information
about a program named Ldp. Apparently I have that program and when I run it
and connect to the server I get:
---------------------
Established connection to ldap.dept.org.com.
Retrieving base DSA information...
Result <0>: (null)
Matched DNs:
Getting 1 entries:
>> Dn:
1> objectclass: top;
1> namingContexts: ;
1> subschemaSubentry: cn=schema;
2> supportedCapabilities: 1.2.840.113556.1.4.800; 1.2.840.113556.1.4.1791;
2> supportedControl: 1.2.840.113556.1.4.319; 1.2.840.113556.1.4.473;
2> supportedLDAPversion: 2; 3;
8> supportedSASLMechanisms: LOGIN; PLAIN; CRAM-MD5; DIGEST-MD5; GSSAPI; GSS-
SPNEGO; MSN; NTLM;
---------------------
I tried playing around in it for awhile, but often did not know what to
enter into various dialogs. Any of that help? Anything I would do in that
program that would help point in the right direction to go in VBA?
Again, Thanks Much,
Clifford Bass
david wrote:
>According to your previous post:
>
>>Testing LDAP://ldap.dept.org.com
>>Successfully got "LDAP://ldap.dept.org.com" object.
>
>So you have successfully connected to the LDAP
>server at ldap.dept.org.com.
>
>After that, it is only a question of what the structure
>is and permissions are for that database.
>
>rootDSE is a standard element for an LDAP 3.0
>database, and you have successfully got that:
>
>>Testing LDAP://ldap.dept.org.com/rootDSE
>>Successfully got "LDAP://ldap.dept.org.com/rootDSE" object.
>
>All LDAP 3.0 servers recognise these attribute names:
>
>subschemaSubentry
>namingContexts
>supportedControl
>supportedSASLMechanisms
>supportedLDAPVersion
>supportedExtension
>altServer
>
>(the attributes will be absent if they are empty)
>
>Since you don't have a "DefaultNamingContext", because that is an Active
>Directory Attribute, let's see what naming contexts you do have:
>set objds = getobject("LDAP://ldap.dept.org.com/rootDSE")
>
>vlist = objds.Get("namingContexts")
>For each s in vlist
> msgbox s
>next
>
>And query the first name Context:
>
>set obj = getobject((LDAP://ldap.dept.org.com/"& vlist(0) )
>
>msgbox obj.name
>
>(david)
--
Message posted via http://www.accessmonster.com
|
|
0
|
|
|
|
Reply
|
Clifford
|
5/4/2010 5:40:20 PM
|
|
It appears to be a very flat database.
> program that would help point in the right direction to go in VBA?
It's not the VBA. The VBA already works.
Having a blank nameContexts value isn't a problem, as you
saw with your ldapsearch.
> ldapsearch -h ldap.dept.org.com "sn=bass"
set obj = getobject("LDAP://ldap.dept.org.com/" & "sn=bass")
to enumerate the objects at the base level:
set objds = getobject(LDAP://ldap.dept.org.com)
for each obj in objds
msgbox obj.name
next
But I do not know about LDAP, nor about your LDAP server. Now that you have
the VBA sorted out, you need to work out what the structure of your database
is.
(david)
"Clifford Bass via AccessMonster.com" <u48370@uwe> wrote in message
news:a782b147f548e@uwe...
> Hi David,
>
> That provides some, but limited progress. Only two of the attributes
> are recognized and they are:
>
> subschemaSubentry = "cn=schema"
> nameContexts = ""
>
> Does that mean it is not an LDAP 3.0 server? Obviously with a blank
> nameContexts value, it does not enumerate any.
>
> ----Later...
>
> Did some online searching on those attributes and discovered
> information
> about a program named Ldp. Apparently I have that program and when I run
> it
> and connect to the server I get:
>
> ---------------------
> Established connection to ldap.dept.org.com.
> Retrieving base DSA information...
> Result <0>: (null)
> Matched DNs:
> Getting 1 entries:
>>> Dn:
> 1> objectclass: top;
> 1> namingContexts: ;
> 1> subschemaSubentry: cn=schema;
> 2> supportedCapabilities: 1.2.840.113556.1.4.800; 1.2.840.113556.1.4.1791;
> 2> supportedControl: 1.2.840.113556.1.4.319; 1.2.840.113556.1.4.473;
> 2> supportedLDAPversion: 2; 3;
> 8> supportedSASLMechanisms: LOGIN; PLAIN; CRAM-MD5; DIGEST-MD5; GSSAPI;
> GSS-
> SPNEGO; MSN; NTLM;
> ---------------------
>
> I tried playing around in it for awhile, but often did not know what
> to
> enter into various dialogs. Any of that help? Anything I would do in
> that
> program that would help point in the right direction to go in VBA?
>
> Again, Thanks Much,
>
> Clifford Bass
>
> david wrote:
>>According to your previous post:
>>
>>>Testing LDAP://ldap.dept.org.com
>>>Successfully got "LDAP://ldap.dept.org.com" object.
>>
>>So you have successfully connected to the LDAP
>>server at ldap.dept.org.com.
>>
>>After that, it is only a question of what the structure
>>is and permissions are for that database.
>>
>>rootDSE is a standard element for an LDAP 3.0
>>database, and you have successfully got that:
>>
>>>Testing LDAP://ldap.dept.org.com/rootDSE
>>>Successfully got "LDAP://ldap.dept.org.com/rootDSE" object.
>>
>>All LDAP 3.0 servers recognise these attribute names:
>>
>>subschemaSubentry
>>namingContexts
>>supportedControl
>>supportedSASLMechanisms
>>supportedLDAPVersion
>>supportedExtension
>>altServer
>>
>>(the attributes will be absent if they are empty)
>>
>>Since you don't have a "DefaultNamingContext", because that is an Active
>>Directory Attribute, let's see what naming contexts you do have:
>>set objds = getobject("LDAP://ldap.dept.org.com/rootDSE")
>>
>>vlist = objds.Get("namingContexts")
>>For each s in vlist
>> msgbox s
>>next
>>
>>And query the first name Context:
>>
>>set obj = getobject((LDAP://ldap.dept.org.com/"& vlist(0) )
>>
>>msgbox obj.name
>>
>>(david)
>
> --
> Message posted via http://www.accessmonster.com
>
|
|
0
|
|
|
|
Reply
|
david
|
5/5/2010 2:37:25 AM
|
|
Hi David,
Sigh! That looked hopeful; but did not work "-(. I won't keep
pestering you--you have been very kind in your attempts to help. I will
putter around some more on my own. In the event I succeed I will post back
with the solution.
Thanks Again,
Clifford Bass
david wrote:
>It appears to be a very flat database.
>
>> program that would help point in the right direction to go in VBA?
>
>It's not the VBA. The VBA already works.
>
>Having a blank nameContexts value isn't a problem, as you
>saw with your ldapsearch.
>
>> ldapsearch -h ldap.dept.org.com "sn=bass"
>
>set obj = getobject("LDAP://ldap.dept.org.com/" & "sn=bass")
>
>to enumerate the objects at the base level:
>
>set objds = getobject(LDAP://ldap.dept.org.com)
>
>for each obj in objds
> msgbox obj.name
>next
>
>But I do not know about LDAP, nor about your LDAP server. Now that you have
>the VBA sorted out, you need to work out what the structure of your database
>is.
>
>(david)
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/201005/1
|
|
0
|
|
|
|
Reply
|
Clifford
|
5/5/2010 4:33:02 PM
|
|
|
12 Replies
293 Views
(page loaded in 0.262 seconds)
Similiar Articles: Query a non-MS/non-Active Directory LDAP Server - microsoft.public ...Hi All, Does anyone know how to query an LDAP server from Access VBA that is not a Microsoft / Active Directory (AD) server? I have found a ... LDAP Query AD - microsoft.public.windows.server.active_directory ...Query a non-MS/non-Active Directory LDAP Server - microsoft.public ... Hi All, Does anyone know how to query an LDAP server from Access VBA that is not a Microsoft ... How to query user credential with LDAPS from Rsa - microsoft ...Query a non-MS/non-Active Directory LDAP Server - microsoft.public ... How to query user credential with LDAPS from Rsa - microsoft ... Query a non-MS/non-Active Directory ... LDAP Connections in Visual Basic For Application. - microsoft ...Is it possible to query active directory using visual basic? I need to ... Query a non-MS/non-Active Directory LDAP Server - microsoft.public ..... Established ... LDAP Issue - LDAP BIND against Windows 2008 DC does not work ...Query a non-MS/non-Active Directory LDAP Server - microsoft.public ..... server -- not a VBA LDAP problem ... will still work ... printer server on domain controller on ... Steps for SAML ADFS Scenario - microsoft.public.windows.server ...Query a non-MS/non-Active Directory LDAP Server - microsoft.public ... Search for any file name in the C:\WINDOWS directory ... Fail to create IXSSO.Query object ... Testing whether a particular DC is authenticating: LDP - microsoft ...Query a non-MS/non-Active Directory LDAP Server - microsoft.public ... Testing whether a particular DC is authenticating: LDP - microsoft ... Query a non-MS/non-Active ... Event ID 9554: Unable to update Mailbox SD in the DS for a non ...... still exist in Active Directory, but the account is > currently disabled. =A0I'm also unable to find it by running an LDAP > query." ... the DS for a non ... Exchange Server ... unable to brows for active directory objects - microsoft.public ...Query a non-MS/non-Active Directory LDAP Server - microsoft.public ..... to query an LDAP server from Access VBA that is not a Microsoft / Active Directory ... ldap ... Update attribute using ldp - microsoft.public.windows.server ...Query a non-MS/non-Active Directory LDAP Server - microsoft.public ... Did some online searching on those attributes and discovered information about a program named Ldp. ... validating username and password in Active Directory - microsoft ...Query a non-MS/non-Active Directory LDAP Server - microsoft.public ... validating username and password in Active Directory - microsoft ..... for use by non ... v1] LDAP ... cannot connect to ad lds using adsi - microsoft.public.windows ...Query a non-MS/non-Active Directory LDAP Server - microsoft.public ..... Microsoft / Active Directory (AD ... someone help to connect to the active directory ... data ... Multiple Active Result Setc (MARS) - microsoft.public.sqlserver ...If query/subform is empty set calculation value to 0 - microsoft ... SELECT VID, Nz ... ... Query a non-MS/non-Active Directory LDAP Server - microsoft.public ... The Indexing Service query cannot be completed successfully ...... try I get the following message: Search Companion The Indexing Service query ... try I get the following message: Search Companion The Indexing Service ... Server ... AD Account got locking out frequently - microsoft.public.windows ...Query a non-MS/non-Active Directory LDAP Server - microsoft.public ..... properties available in an Active Directory. But again, it starts out ... and you have ... Still unable to run successful query - microsoft.public.access ...Query a non-MS/non-Active Directory LDAP Server - microsoft.public ... Still unable to run successful query - microsoft.public.access ..... given but it returns only Not ... PowerPoint automation in C++: Error, There is no active ...Query a non-MS/non-Active Directory LDAP Server - microsoft.public ... It gives the error "Automation error" "There is no such object on ... If one specific Active ... non-domain PC on the network - microsoft.public.windows.server ...Query a non-MS/non-Active Directory LDAP Server - microsoft.public ... Query a non-MS/non-Active Directory LDAP Server - microsoft.public ... How to find out to which ... Giving access to AD user attribute read/write - microsoft.public ...Query a non-MS/non-Active Directory LDAP Server - microsoft.public ... Giving access to AD user attribute read/write - microsoft.public ... Query a non-MS/non-Active ... Because the Exchange MTA is disabled, the store driver ...The result of that was a smashed Exchange server. ... Microsoft Certified Trainer Microsoft MVP - Directory ... 12018 Exchange 2007 Dirk 2 300 Hi, I ... by the active ... Query a non-MS/non-Active Directory LDAP Server DataBaseHi All, Does anyone know how to query an LDAP server from Access VBA that is not a Microsoft / Active Directory (AD) server I have found a lot of stuff Query a non-MS/non-Active Directory LDAP Server - microsoft.public ...Hi All, Does anyone know how to query an LDAP server from Access VBA that is not a Microsoft / Active Directory (AD) server? I have found a ... Re: Query a non-MS/non-Active Directory LDAP ServerRe: Query a non-MS/non-Active Directory LDAP Server Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance Dynamic-LDAP-Server attribute - Microsoft Corporation: Software ...... Directory Services > Directories > Active Directory Schema > ... ms-DS-Non-Security-Group-Extra-Classes ... Dynamic-LDAP-Server: Ldap-Display-Name: dynamicLDAPServer ms-DS-Port-LDAP attribute - Microsoft Corporation: Software ...... which port is used by the directory service to listen for LDAP ... Active Directory Schema > Attributes > All ... ms-DS-Az-LDAP-Query LDAP Query AD - microsoft.public.windows.server.active_directory ...Query a non-MS/non-Active Directory LDAP Server - microsoft.public ... Hi All, Does anyone know how to query an LDAP server from Access VBA that is not a Microsoft ... LDAP - HOW DO I CONNECT TO LDAP DB FROM SQL SERVER 2005?I need to query an LDAP database on a Linux server ... for LDAP should work fine with linked server. But you need to test non-ms ... to a MS Active directory, you ... LDAP authentication - MoodleDocs - Moodle.org: open-source ...... organization,dc=domain as the root of your LDAP tree. You have a non ... MS ActiveDirectory if your LDAP server is running Microsoft's Active Directory (MS-AD) MS Strategy for Lightweight Directory Access Protocol (LDAP)MS Windows NT Server 4.0 ... Directory Access Protocol (LDAP) is a protocol for clients to query and ... Lightweight Directory Access Protocol (LDAP) Active Directory ... LDAP authentication - MoodleDocs... set up Lightweight Directory ... MS ActiveDirectory if your LDAP server is running Microsoft's Active Directory (MS-AD) ... over a non-SSL connection you'll want to use: ldap ... 7/25/2012 11:16:02 PM
|