|
|
|||||||
Hi, I've made a script where I want to get info from a LDAP server (NOT AD!). I have no proplems on getting normal LDAP objects as CN, SN, NAME etc. But When I want to get objects we have added to the LDAP I get an error: COM exception error "get" (Active Directory - The Active Directory datatype cannot be converted to/from a native DS datatype) [-2147352567/80020009] Hope someone can help me |
||||||||
|
|
|||||||
Btw. I'm using kix 4.22 The code is like this: BREAK On $FileName="C:\TEMP\RanaUserInfo.txt" ;$FileName="C:\TEMP\ADUserInfo.txt" ;$LDAP="LDAP://ou=users,ou=kpdk,dc=q8int,dc=com" $LDAP="cn=HK,cn=Q8" $predom="LDAP://rana/" $domain="cn=HK,cn=Q8" GetAllADUserInfoToFile($domain) FUNCTION GetAllADUserInfoToFile($dom) DIM $type IF EXIST($Filename) = 1 DEL($Filename) ENDIF $ou = GETOBJECT($predom+$dom) FOR EACH $Item IN $ou $domain=$item.name+","+$dom $ClassDom=GETOBJECT($predom+$domain) $kurt=$ClassDom.objectclass $type=0 FOR EACH $i IN $kurt SELECT CASE $i="applicationprocess" $type=1 CASE $i="q8ansathk" $type=2 ENDSELECT NEXT IF $type = 1 CALL GetAllADUserInfoToFile($domain) ENDIF IF $type = 2 IF OPEN(1,"$FileName", 5)= 0 $InitialObj=GETOBJECT($predom+$domain) $init=$InitialObj.get("initialer") $out = WRITELINE(1, $init+@serror+@crlf) $x = CLOSE(1) ENDIF ENDIF NEXT ENDFUNCTION |
||||||||
|
|
|||||||
Well.. This will never work. ;$LDAP="LDAP://ou=users,ou=kpdk,dc=q8int,dc=com" Is rana a DC? If so, you need entries for your dc too. Like - dc=rana,dc=q8int,dc=com on the end of your LDAP String. You need to uncomment this line. Kent |
||||||||
|
|
|||||||
not true. |
||||||||
|
|
|||||||
Jooel, You are right, you can just specify a DC as part of the LDAP://DC.. Maybe spark up a copy of ADSVW.EXE to see what canonical objects, etc. are. Kent |
||||||||
|
|
|||||||
I know it wouldn't work, that's why I have comment it out :-) It was just for testing. The LDAP server is NOT a DC. I'm not communicating whit an AD. It's our own LDAP server |
||||||||
|
|
|||||||
Hi, It's not a Microsoft server I'm trying to communicate with. It's our own LDAP server (running on Solaris) |
||||||||
|
|
|||||||
well, going back looking the error, it says it has problem with datatypes and their conversion... |
||||||||
|
|
|||||||
What does that mean?? The native LDAP object (like CN, SN, NAME etc) does work. It's only when I try to get our own objects I get this error |
||||||||
|
|
|||||||
Perhaps you'd be better off with something like an ODBC LDAP connector. The implication of the error message is that only native MS LDAP objects are supported via the LDAP: provider. |
||||||||
|
|
|||||||
How do I use ODBC LDAP? |
||||||||
|
|
|||||||
Hmm. To be honest I'm not sure I assumed that someone would have already provided this functionality, but a quick search has not shown up anything useful. What is your LDAP server based on? Commonly they have a SQL back-end where the data is actually stored so you can interrogate this directly rather than using LDAP. |
||||||||
|
|
|||||||
The person who know what SQL we are running has left, so I can't answer that question Thanks for you answer |
||||||||
|
|
|||||||
Ok, this is a link to a posting which describes how to access an OpenLDAP service using VB. This should get you started: http://www.dragoninc.on.ca/mail-archives/openldap-software/2002-04/0484.html |
||||||||
|
|
|||||||
Uuuh I'm not a VB man Maybe I can find someone who is Thanks for your help |
||||||||
|
|
|||||||
Does anyone know what else to do? |
||||||||
|
|
|||||||
You should be able to convert it to KiXtart almost word for word. The best solution however would still be to talk to the back-end database directly. What else do you know about the LDAP server software? |
||||||||
|
|
|||||||
OK. I'll have a go. I don't know much about the LDAP server, only it's a LDAP server and it's running on a Sun server |
||||||||
|
|
|||||||
Here is a littoral translation of the sample code into KiXtart, however I don't have anything to test on here: Code: ; Build the LDAP search condition... |
||||||||
|
|
|||||||
Hi, Got the new search working fine with standard LDAP objects, but when I tried our own defined objects I get this error: COM exception error "Execute" (Provider - Unspecified error) [-2147352567/80020009] Jan |
||||||||
|
|
|||||||
Sorry, this is about as far as I can go as I don't have a test environment. The only things I can think of are:
|
||||||||
|
|
|||||||
I have no problems with MS clients. I'm using JXplorer and that works finde. The only thing i do is change the objectname of what I want to display. I'm been told the type is the same for all objects |
||||||||
|
|
|||||||
Ok, there is some good and bad news. Lots of other people seem to have this problem. I don't really understand LDAP myself, but from what I'm reading the MS LDAP provider caches the LDAP structure locally and uses this to interrogate the server. Here is a posting I found on a Novell site to fix a similar problem, it is a work-around (highlight in bold are mine): Quote: Here is a link to a KB article about accessing third-party LDAP servers using ADSI: http://support.microsoft.com/kb/q251195/ I found these by GOOGLEing using the original error message that you had. |