http://bugs.winehq.org/show_bug.cgi?id=22874
Summary: ADO fails to connect to Jet database via OLE DB Product: Wine Version: 1.1.42 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ole32 AssignedTo: wine-bugs@winehq.org ReportedBy: birdfamily715@googlemail.com
Created an attachment (id=28274) --> (http://bugs.winehq.org/attachment.cgi?id=28274) Source of C program
Wrote a small test program in C to create the "ADODB Connection" object and then invoked the Open method on it with a connection string specifying the Jet engine and a database file. The ADO Connection objects seems to be created although there are some error messages, but the Open fails with an unspecific exception. The Wine installation was set up in Kubuntu 10.04, installing MDAC28 and Jet40 using winetricks and the Jet driver registry settings mentioned in http://wiki.winehq.org/NativeOdbc DCOM98 was not installed initially, but this was repeated with DCOM98 installed (winetricks again). There were fewer errors, but the Open still failed. These error messages were: err:ole:CoGetClassObject class {2206cdb0-19c1-11d1-89e0-00c04fd7a829} not registered err:ole:CoGetClassObject no class object {2206cdb0-19c1-11d1-89e0-00c04fd7a829} could be created for context 0x1 err:ole:CoGetClassObject class {c8b522cf-5cf3-11ce-ade5-00aa0044773d} not registered err:ole:CoGetClassObject no class object {c8b522cf-5cf3-11ce-ade5-00aa0044773d} could be created for context 0x1 These two GUIDs relate to interfaces in oledb32.dll, but registering the DLL with wine regsvr32.exe oledb32.dll seems to make no difference. Is it the context? Well, it works in Windows. Attaching source file and logfile.
http://bugs.winehq.org/show_bug.cgi?id=22874
--- Comment #1 from Barry Bird birdfamily715@googlemail.com 2010-05-25 11:35:16 --- Bug 5841 "ADO no worky" may be considered related, but it relates to VB6 and xml
http://bugs.winehq.org/show_bug.cgi?id=22874
--- Comment #2 from Andrew Nguyen arethusa26@gmail.com 2010-05-25 11:40:30 --- Does registered native oledb32.dll make a difference?
http://bugs.winehq.org/show_bug.cgi?id=22874
--- Comment #3 from Barry Bird birdfamily715@googlemail.com 2010-05-25 12:22:05 --- Reply: No, the error messages saying that the class was not registered still came out, and I couldn't find the registry entries 2206cdb0-19c1-11d1-89e0-00c04fd7a829 c8b522cf-5cf3-11ce-ade5-00aa0044773d either under HKCR\CLSID which makes me think regsvr32 wasn't working, or am I missing something?
In the DCOM98 installed version, trying to use regsvr32 on oledb32.dll produced a failure message.
There was another CLSID 6c736db1-bd94-11d0-8a23-00aa00b58e10 complained about which I couldn't find in my Windows registry and comments about which disappeared when DCOM98 was installed.
Googling seems to suggest it's to do with Visual Studio (?)
I've been unable to attach my logfile (only 27kb) which gives a little more information. I'll try again. Could it be that installing MDAC is not properly registering all its DLLs?
Barry
http://bugs.winehq.org/show_bug.cgi?id=22874
--- Comment #4 from Andrew Nguyen arethusa26@gmail.com 2010-05-25 14:41:17 --- If you start with a clean Wine prefix, and then install mdac28 and jet40 from an up-to-date winetricks (the mdac28 verb adds a native oledb32.dll override), does that change anything? Also, how do you compile your test program?
http://bugs.winehq.org/show_bug.cgi?id=22874
--- Comment #5 from Barry Bird birdfamily715@googlemail.com 2010-05-25 15:42:38 --- Perhaps I need to give a bit more detail of what this is all about. I would like to see Wine supporting ADO for my own purposes. As you seem to have mastered COM/DCOM, no mean feat, I thought I might be able to help you deal with ADO, as I have found out how to drive ADO at a low level, from C. So I wrote as simple a console program as I could and compiled the program on Windows XP using Mingw. It was linked with libraries -lole32 -loleaut32 -luuid You have the source. What it does in VB terms is:
- set obj = CreateObject("ADODB.Connection") - obj.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=stock.mdb;Jet OLEDB:Engine Type=4","","",0) - obj.Close
It has a number of printf statements so that you see its progress. On Windows the output is: $ ado1a.exe ADODB Object created CallMethod entered GetIDsOfNames returned Invoke 'Open' succeeded ADODB connection opened CallMethod entered GetIDsOfNames returned Invoke 'Close' succeeded Close down
On Kubuntu I created a clean new wine prefix, installed MDAC28 and JET40 using winetricks and just added a few extra registry entries I mentioned earlier. When this program is run I got: $ ./ado1a.exe 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 ADODB Object created CallMethod entered GetIDsOfNames returned err:ole:CoGetClassObject class {2206cdb0-19c1-11d1-89e0-00c04fd7a829} not registered err:ole:CoGetClassObject no class object {2206cdb0-19c1-11d1-89e0-00c04fd7a829} could be created for context 0x1 err:ole:CoGetClassObject class {c8b522cf-5cf3-11ce-ade5-00aa0044773d} not registered err:ole:CoGetClassObject no class object {c8b522cf-5cf3-11ce-ade5-00aa0044773d} could be created for context 0x1 Invoke Method 'Open' failed: HRESULT 80020009 ** Invoke Method 'Open' failed Open connection failed
I'm not sure whether the log file (if only I could upload it), tells you much more. A Query Interface fails and the message L"Provider cannot be found. It may not be properly installed." is produced. It seems to me that it all reduces to the inability to register oledb32.dll with the interfaces MSDASC.MSDAINITIALIZE (2206cdb0-19c1-11d1-89e0-00c04fd7a829) and MSDAER (c8b522cf-5cf3-11ce-ade5-00aa0044773d) (at least).
http://bugs.winehq.org/show_bug.cgi?id=22874
--- Comment #6 from Andrew Nguyen arethusa26@gmail.com 2010-05-25 16:12:06 --- I'm not seeing your failure. I did:
1. Starting with a clean Wine prefix, and winetricks from SVN, execute winetricks -q mdac28 jet40. 2. Copy the Northwind sample database to the directory where the compiled ado1b.exe file is, naming it stock.mdb.
I get (snipping out irrelevant "no class object" messages):
ADODB Object created CallMethod entered GetIDsOfNames returned Invoke 'Open' succeeded ADODB connection opened CallMethod entered GetIDsOfNames returned Invoke 'Close' succeeded Close down
So the sample should be working as intended if the redists are installed properly.
http://bugs.winehq.org/show_bug.cgi?id=22874
--- Comment #7 from Andrew Nguyen arethusa26@gmail.com 2010-05-25 16:17:00 --- Note that interfaces {2206cdb0-19c1-11d1-89e0-00c04fd7a829} and {c8b522cf-5cf3-11ce-ade5-00aa0044773d} correspond to "MSDAInitialize class" and "Microsoft OLE DB Error Collection Service" from oledb32.dll, respectively. They don't seem to be present in Wine's implementation, but if you are using native oledb32.dll from the MDAC redist then the sample should work.
http://bugs.winehq.org/show_bug.cgi?id=22874
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|ole32 |-unknown
http://bugs.winehq.org/show_bug.cgi?id=22874
--- Comment #8 from Barry Bird birdfamily715@googlemail.com 2010-05-26 11:54:16 --- (In reply to comment #6)
I'm not seeing your failure. I did:
- Starting with a clean Wine prefix, and winetricks from SVN, execute
winetricks -q mdac28 jet40. 2. Copy the Northwind sample database to the directory where the compiled ado1b.exe file is, naming it stock.mdb.
I get (snipping out irrelevant "no class object" messages):
ADODB Object created CallMethod entered GetIDsOfNames returned Invoke 'Open' succeeded ADODB connection opened CallMethod entered GetIDsOfNames returned Invoke 'Close' succeeded Close down
So the sample should be working as intended if the redists are installed properly.
OK, it's my mistake. Now it works for me too. I think what I was doing wrong is running winetricks from ~/folder rather than ~/.wine-ole/drive_c/... If I had thought about it for half a second, I would have realised that that can't work. I've deleted and re-worked the wine prefix. MDAC must now be properly installed and the program works for me too. Not only that small program, but my much more extensive programs, and for ADOX as well as ADO. So, thank for your help. Bug 5841 "ADO no worky" would seem to be solved, although there may still be a problem with VB6 interfacing, but ADO is definitely 'worky'.
http://bugs.winehq.org/show_bug.cgi?id=22874
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID
--- Comment #9 from Vitaliy Margolen vitaliy@kievinfo.com 2010-05-26 22:14:41 --- Invalid then
http://bugs.winehq.org/show_bug.cgi?id=22874
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Vitaliy Margolen vitaliy@kievinfo.com 2010-05-26 22:14:56 --- Closing.