Re: Error running application, please Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No, because the application dont works !


When I install MDAC28 .... the "Class name not found" error disappears .... but my application show me ... 

Error: When calling to the external object function properties. On line 37 
of the function f_ldap_logon of the object f_ldap_logon 

this is the function (see the bottom): 
and this is the line 37 
---> adoConnection.Properties("User ID", ls_user) 

and wine show me the error, and the application ends: 

err:ole:CoGetClassObject class {6c736db1-bd94-11d0-8a23-00aa00b58e10} not registered 
err:ole:CoGetClassObject no class object {6c736db1-bd94-11d0-8a23-00aa00b58e10} could be created for context 0x1 

But .... this key is not in my windows XP and others, I put it on google "6c736db1-bd94-11d0-8a23-00aa00b58e10" and it is something realative to OLEDB but ... I dont know what is happening. 

Please help me if it is possible. 

Thanks you very much. 

Francisco. 


// f_ldap_logon -> Boolean 
// Validar el usuario en el Active directory (LDAP) 
// as_dominio 
// as_user 
// as_password 
// VMC GC-3857 17/09/2008 Creación 
// VMC GC-3895 29/09/2008 Recuperar la dirección del servidor del LDAP de la BD. Para que funcione en equipos que no están validados en el dominnio. 

OLEObject adoCommand, adoConnection, adoRootDSE 
OLEObject adoRecordset 
String ls_Query, ls_Value, ls_DNSDomain 
String ls_user, ls_pass, ls_domain, ls_red 
Integer li_rc 
boolean lb_valido 

ls_domain = as_dominio 
ls_red = as_user 
ls_pass = as_password 
ls_user = ls_red + '@' + ls_domain 


// Create objects 
adoCommand = Create OLEObject 
adoConnection = Create OLEObject 
adoRootDSE = Create OLEObject 

// Setup ADO objects 
li_rc = adoCommand.ConnectToNewObject("ADODB.Command") 
If f_Ldap_ConnectError(li_rc, "ADODB.Command") Then Return FALSE 

li_rc = adoConnection.ConnectToNewObject("ADODB.Connection") 
If f_Ldap_ConnectError(li_rc, "ADODB.Connection") Then Return FALSE 

adoConnection.Provider = "ADsDSOObject" 

//Conexión con autentificación de usuario 
adoConnection.Properties("User ID", ls_user) 
adoConnection.Properties("Password", ls_pass) 

adoConnection.Open("Active Directory Provider") 
adoCommand.ActiveConnection = adoConnection 

//[I]VMC GC-3895 29/09/2008 Recuperar la dirección del servidor del LDAP de la BD. Para que funcione en equipos que no están validados en el dominnio. 
// Determine the domain 
//li_rc = adoRootDSE.ConnectToObject("LDAP://RootDSE") 
//If f_Ldap_ConnectError(li_rc, "ADODB.Connection") Then Return FALSE 
//ls_DNSDomain = adoRootDSE.Get("defaultNamingContext") 
SELECT ldap_ip INTO :ls_DNSDomain FROM aplicacion WHERE upper(nombre)=upper(:gs_siglas_aplicacion) ; 
If (SQLCA.SQLCode<>0) Then Return FALSE 
//[F]VMC GC-3895 29/09/2008 

//Consulta para comprobar si el usuario con el que se ha realizado la conexión es válido. 
ls_Query = "SELECT sAMAccountName " 
ls_Query += "FROM 'LDAP://" + ls_DNSDomain + "' " 
ls_Query += "WHERE objectClass='user' and objectCategory='person' and samaccountname='"+ ls_red +"'" 

try 
// Run the query 
adoCommand.CommandText = ls_Query 
adoRecordset = adoCommand.Execute 
// Recuperar el lod datos del usuario conectado. 
//Esto requiere que todo usuario del dominio, tenga permisos para consultar los datos del ldap. 
//Si los usuarios del dominio no tuvieran permisos para consultar el ldap, habría que quitar las dos sentencias siguientes. 
If NOT adoRecordset.EOF Then ls_Value = String(adoRecordset.Fields("sAMAccountName").Value) 
If upper(ls_value) = upper(ls_red) then lb_valido = TRUE 
// Close the connection 
adoRecordset.Close 
catch ( oleruntimeerror orte ) 
//No tiene permisos 
//MessageBox("OLERuntimeError", orte.Text) 
end try 

// Close the connection 
adoConnection.Close 

// Destroy objects 
Destroy adoCommand 
Destroy adoConnection 
Destroy adoRootDSE 

Return lb_valido



http://bugs.winehq.org/show_bug.cgi?id=17550






[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux