There is a VB6 application that uses ADODB to connect to LDAP and do a lot of operations, there is an LDAP Attribute (field) called "co-unit" and when the application runs specifically on Windows 8 (it has been tested on other OSs and works 100%) generates an "Unspecified error (-2147467259)" error and after analyzing the source code it was discovered that the problem is that when trying to run the Querye it does not accept any field that contains in its name the hyphen, for example co-unit , no-drive, dt-creation, etc ...
I have already searched in numerous forums including MVPs and other professionals but I have not been able to find any solution, because it seems that this problem should never have occurred.
I would like to know if there is anyone who can help me and give a light to solve this problem, I have tried everything, changed components, tried to get the Attribute through ADSPath among other ways and none gave result giving the same error.
You are my last attempt to help.
I'm waiting for some help from someone.
Excerpt from code that generates error:
sqlStmt = "SELECT uid, co-unit, cn" & _
"FROM 'LDAP: //" & m_LDAPServer & ":" & m_LDAPPort & "/ o =" & m_Org & "/ ou =" & m_OrgPeople &
"WHERE uid = '" & m_User & "'" & "and objectClass = '*'"
'executes the data string ...
Set rs = con.Execute (sqlStmt) 'IN THIS POINT IT GENERATES ERROR, BECAUSE IT DOES NOT ROLL THE STRING, ONLY IF I REMOVE THE FIELD co-unit BUT I NEED THIS FIELD FOR THE CONTINUITY OF THE OPERATION THAT THE SYSTEM DOES.