Need help with VB6 ADO, OLE and JET

Questions about Wine on Linux
Locked
THN
Level 2
Level 2
Posts: 20
Joined: Tue May 31, 2016 2:24 pm

Need help with VB6 ADO, OLE and JET

Post by THN »

Hi

I have a very simplistic VB6 application that connects to an ADO database and lets you walk through all records of one recordset.

To do the work, I have placed an MS ADO Data Control 6.0 (OLEDB) Active-X control (MSADODC.OCX) on the form. This has pulled two more dependencies into the VB project's references:
MS ActiveX Data Objects 2.5 library (msado25.tlb) and Microsoft Data Binding Collection (MSBIND.DLL).
The OCX opens the connection to the database file with the connection string
Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=<...path_and_filename...>
Obviously my drives should be mapped correctly so that the given path_and_filename can be found under linux.

There is actually no further code at all in the app, all is done by the OCX and by connecting some text fields to it and specify which data field they should display.

Now by installing a bunch of dll (vb6run jet40 mdac28) via winetricks - plus msbind.dll and MSADODC.OCX grabbed from "somewhere else" - I have managed to convince the app to start up under linux wine with just one remaining error message:
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

The app itself shows the error message "Provider cannot be found. It may not be properly installed". The app then starts, but the control does not connect to the database.

Is this a problem of the ODBC/OLE/JET/whatever connection between app and database, or a configuration problem of the ODBC stuff (I can configure some things by running "wine control") or am I still missing an OCX/dll/whatever?

Thanks for any help

THN
THN
Level 2
Level 2
Posts: 20
Joined: Tue May 31, 2016 2:24 pm

Re: Need help with VB6 ADO, OLE and JET

Post by THN »

If that rings a bell for someone, I notice that the jet40 install seems to fail with
err:ole:TLB_ReadTypeLib Loading of typelib L"C:\\Program files\\Common files\\Microsoft shared\\dao\\dao2535.tlb" failed with error 2
It seems I don't have that file (dao2535.tlb), not in that subdirectory and nowhere else either.

Is it relevant?

If so, how to solve that?

THN
THN
Level 2
Level 2
Posts: 20
Joined: Tue May 31, 2016 2:24 pm

Re: Need help with VB6 ADO, OLE and JET

Post by THN »

OK, so I have "solved" the error with dao2535.tlb by copying over the files from my W7 machine (C:\Program Files\Common Files\microsoft shared\DAO) and regging them;
still the errors with my VB6 app persist w/o any change.

Help?
THN
Level 2
Level 2
Posts: 20
Joined: Tue May 31, 2016 2:24 pm

Re: Need help with VB6 ADO, OLE and JET

Post by THN »

OK, so I have not been able to get the ADO Active-X to run under wine, it always came back with the above error.
So I decided to translate what the OCX is doing "internally" into regular code... that allows me to open the DB and recordset "manually".
With that it works OK.
This can be closed.

THN
Locked