http://bugs.winehq.org/show_bug.cgi?id=29961
Bug #: 29961 Summary: ADO.NET query on a Jet database fails. Product: Wine Version: 1.3.24 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: mscoree AssignedTo: wine-bugs@winehq.org ReportedBy: birdfamily715@googlemail.com Classification: Unclassified
Created attachment 38996 --> http://bugs.winehq.org/attachment.cgi?id=38996 ADO.NET Jet database commands that worked
ADO.NET commands (CREATE TABLE, INSERT, UPDATE and DELETE) work (inspection of the database afterwards shows that to be true), but a SELECT query produces the error "Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another." Needless to say, the same code ran successfully on Windows.
Winetricks was used to import JET40, MDAC28 and DOTNET20.
In order for a database connection to be made, however, it was necessary to copy across five DLLS from Windows: comsvcs.dll, CLBCatQ.DLL, colbact.DLL, COMRes.dll, and MTXCLU.DLL and register one: $ wine regsvr32.exe comsvcs.dll
Attached are c-sharp code files for the database commands that worked (adonet2.cs) and for the one that didn't (the SELECT query) (adonet1.cs). For succesful compilation they require the addition of references to (under COM) ' Microsoft ActiveX Data Objects 2.8' which results in the production of a Dll: Interop.ADODB.dll and this must be copied across into Wine along with the executables. An empty Jet database test.mdb, is also attached. This can be populated by adonet2.exe and then queried by adonet1.exe adonet2 creates a database table, inserts four records, updates one, deletes another and runs to completion. Finally odbc4.c is a C program which provides a query in odbc which can be used to inspect the table rows of the database.
http://bugs.winehq.org/show_bug.cgi?id=29961
--- Comment #1 from Barry Bird birdfamily715@googlemail.com 2012-02-20 15:20:20 CST --- Created attachment 38997 --> http://bugs.winehq.org/attachment.cgi?id=38997 ADO.NET Jet database query that didn't work
http://bugs.winehq.org/show_bug.cgi?id=29961
--- Comment #2 from Barry Bird birdfamily715@googlemail.com 2012-02-20 15:21:19 CST --- Created attachment 38998 --> http://bugs.winehq.org/attachment.cgi?id=38998 Empty Jet database file
http://bugs.winehq.org/show_bug.cgi?id=29961
--- Comment #3 from Barry Bird birdfamily715@googlemail.com 2012-02-20 15:22:33 CST --- Created attachment 38999 --> http://bugs.winehq.org/attachment.cgi?id=38999 Database table dump - C source
http://bugs.winehq.org/show_bug.cgi?id=29961
Vitaliy Margolen vitaliy-bugzilla@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source Component|mscoree |-unknown
--- Comment #4 from Vitaliy Margolen vitaliy-bugzilla@kievinfo.com 2012-02-20 20:09:16 CST --- Please upgrade to the latest Wine version wine-1.4-rc4 and retest.
http://bugs.winehq.org/show_bug.cgi?id=29961
--- Comment #5 from Barry Bird birdfamily715@googlemail.com 2012-02-21 07:01:08 CST --- In response to a request for clearer instructions on running a test case I offer this: Here is a command script for Windows, assuming you have MDAC installed and .Net 2.0 and (I think) a .NET SDK:
SET PATH=%PATH%;%WINDIR%\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft.NET\SDK\v2.0\Bin REM Imports the ADO Type Library into .NET: tlbimp "C:\Program Files\Common Files\System\ado\msado15.dll" /namespace:ADODB /out: Interop.ADODB.dll REM Compiles the C# source files referencing the type library: csc /out:adonet1.exe /reference:Interop.ADODB.dll adonet1.cs csc /out:adonet2.exe /reference:Interop.ADODB.dll adonet2.cs
and compile odbc4.c in mingw: gcc -I/mingw/include -Wall -c odbc4.c gcc -L/mingw/lib ./odbc4.o -o odbc4.exe -lodbc32
Plainly, you can edit these source files to make further tests.
Copy Interop.ADODB.dll adonet1.exe adonet2.exe and odbc4.exe to the same directory under Wine and run this script:
cp test.mdb testrun.mdb # populates the database wine adonet2.exe testrun.mdb # shows what the database table contains: wine odbc4.exe testrun.mdb # runs the query program that fails under wine: wine adonet1.exe testrun.mdb
http://bugs.winehq.org/show_bug.cgi?id=29961
--- Comment #6 from Barry Bird birdfamily715@googlemail.com 2012-02-25 09:34:53 CST --- Created attachment 39067 --> http://bugs.winehq.org/attachment.cgi?id=39067 Test case for ADO in C
This C program provides a test case to verify that ADO works on Jet databases outside of .NET. The compilation lines are given as comments (mingw in Windows). The compiled program can be run thus:
wine adotest1.exe test.mdb counties -v
where 'test.mdb' is a Jet database file, 'counties' is a table name. The output contains up to 8 rows of the table (any existing table in the database can be chosen): NAME TOWN POPULATION AREA ================================================================================ NORFOLK NORWICH 840600 2074 DORSET LULWORTH 512000 2000 DERBYSHIRE DERBY 1010600 1014
http://bugs.winehq.org/show_bug.cgi?id=29961
--- Comment #7 from Barry Bird birdfamily715@googlemail.com 2012-03-08 09:08:08 CST --- I've compiled and installed wine 1.4 and run the test described and it still fails the same way.
http://bugs.winehq.org/show_bug.cgi?id=29961
Ken Sharp kennybobs@o2.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |testcase
https://bugs.winehq.org/show_bug.cgi?id=29961
--- Comment #8 from Ken Sharp imwellcushtymelike@gmail.com --- Is this still an issue in Wine 1.7.45 or later?
https://bugs.winehq.org/show_bug.cgi?id=29961
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net, | |super_man@post.com
https://bugs.winehq.org/show_bug.cgi?id=29961
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEEDINFO Ever confirmed|0 |1
--- Comment #9 from Anastasius Focht focht@gmx.net --- Hello folks,
last call: please retest using recent Wine version, preferably Wine 1.7.55 or later.
If there is no response after certain time, the bug will be closed without further notice (abandon).
Regards
https://bugs.winehq.org/show_bug.cgi?id=29961
--- Comment #10 from Barry Bird birdfamily715@googlemail.com --- I have retested now with Wine 1.8 running on Linux Mint 17. I upgraded to wine-mono4.5.6 and wine-gecko2.40 (using the Mint apt-get).
The query now works and the C# program interoperating with ADO.NET and the Jet database (adonet1.exe) produces the right result of the database query (same as the corresponding C program), but the program fails to exit. It hangs after returning from the close of the connection.
The last two executable statements in the program are: Connect.Close(); Console.WriteLine("Connection closed.");
The connection closed message appears, so close returned but somehow the program exit hangs. The corresponding C program exits normally.
The other C# program (adonet2.exe) which creates a table, inserts, updates and deletes a row also works but hangs on exit in the same way.
https://bugs.winehq.org/show_bug.cgi?id=29961
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
--- Comment #11 from super_man@post.com --- Sounds fixed to me then. The hang is most likely a different issue that should have its own bug report.
https://bugs.winehq.org/show_bug.cgi?id=29961
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|austinenglish@gmail.com |
https://bugs.winehq.org/show_bug.cgi?id=29961
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx@gmail.com, | |winetest@luukku.com
--- Comment #12 from winetest@luukku.com --- (In reply to Barry Bird from comment #10)
I have retested now with Wine 1.8 running on Linux Mint 17. I upgraded to wine-mono4.5.6 and wine-gecko2.40 (using the Mint apt-get).
The query now works and the C# program interoperating with ADO.NET and the Jet database (adonet1.exe) produces the right result of the database query (same as the corresponding C program), but the program fails to exit.
https://bugs.winehq.org/show_bug.cgi?id=29961
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |RESOLVED Resolution|--- |FIXED
--- Comment #13 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Barry Bird from comment #10)
The query now works and the C# program interoperating with ADO.NET and the Jet database (adonet1.exe) produces the right result of the database query (same as the corresponding C program), but the program fails to exit. It hangs after returning from the close of the connection.
Thanks for testing again, I tried testing this myself but SQLDriverConnect returns -1 and the sample gives up, I don't know why...
For the hanging on exit please open a new bug report.
https://bugs.winehq.org/show_bug.cgi?id=29961
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #14 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.9.17.