[Wine] Re: When ODBC native support in wine?

fmorales wineforum-user at winehq.org
Thu Feb 26 16:19:44 CST 2009


Thank you very much, I am going to try to explain my problem, my English is awfull but I think that enough.

I have write a application with Sysbase PowerBuilder. This application connect with a oracle 8i database but first, show a validation user/password screen that connect with a Active Directory Microsoft 2003 server.

The application works fine in a windows XP new fresh installation, just I need to install the oracle 8i client.
------

I am trying to run the application under wine.
I am trying with ubuntu 8.10 distro and Fedora 10 (the lastes ubuntu and fedora) with wine stable 1.0.1

First I install java with wine, and all works fine (I need it for the universal oracle installer).

After, I install the oracle 8i client ... that it is installed successfully

..................

I try to run the application and it´s works .... the application start and show me the validation screen but after click enter with the user and password .... the application show me an error "Class name not found"  .... making a debug with winedbg I could see that something is wrong with the ODBC /OLEDB so I try to install Winetricks 
MDAC 25/27/28 ... I try all, (I have a vmware virtual machine and I have make several snapshot and reserse it trying all the MDAC).

When I install MDAC27 .... 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:

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







More information about the wine-users mailing list