When ODBC native support in wine?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
fmorales
Level 2
Level 2
Posts: 21
Joined: Fri May 09, 2008 5:50 am

When ODBC native support in wine?

Post by fmorales »

Hello, first , I would like to thank you for your great work with wine.

When will be possible I fine implementation of ODBC support in wine? the actual with MDAC25 /27/28 are not very fine and a lot of people have a lot of problem .... where are a very high application number that need this feature for run proporty.

Thanks a lot
James Mckenzie

When ODBC native support in wine?

Post by James Mckenzie »

fmorales <[email protected]> wrote on Feb 26th:
Hello, first , I would like to thank you for your great work with wine.

When will be possible I fine implementation of ODBC support in wine?
Which ODBC, unix or Windows? unixODBC, from what I understand does work with Wine.
MDAC25 /27/28 are not very fine and a lot of people have a lot of problem.
Blame that on Microsoft as they only support certain interconnections into their products. However, Oracle Clients also use MDAC functionality to connect to databases through the installation of their own drivers which should exist in user space.
Where are a very high application number that need this feature for run proporty.
Hmmmm. This is definitely the first time that I've heard of that. Since most people want to use things like Office 2003 and Office 2007, and neither need or require ODBC, can you name a product that requires the installation of ODBC? Are you talking about Oracle applications that desire an ODBC connection to an existing Oracle instance, either on the local machine or a remote. unixODBC can do that for you and Wine is reported to be able to use the ODBC connection presented by this product.

We would like to help you, but we need much more information than what you just provided. Can you provide the name of a program that requires ODBC and if it is available in either trial or demo format?

James McKenzie
fmorales
Level 2
Level 2
Posts: 21
Joined: Fri May 09, 2008 5:50 am

Post by fmorales »

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 for verify if the user is in of the domain.

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

//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
Locked