Bug 43298 - MinGW FILEOPEN hang instead of error message when using ADO
Summary: MinGW FILEOPEN hang instead of error message when using ADO
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
Master old -3.6
Hardware: x86 (IA32) Windows (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: 36555
Blocks: mabMinGW
  Show dependency treegraph
 
Reported: 2011-11-28 04:48 UTC by Lionel Elie Mamane
Modified: 2019-10-18 10:17 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lionel Elie Mamane 2011-11-28 04:48:54 UTC
With the MinGW build, opening an MS Access (.mdb) file hangs LibreOffice. It works with an MSVC build. One gets the "hourglass" mouse pointer and one has to forcefully close the application.

Connecting to *other* ADO datasources works as well or bad than in the MSVC build.

At least one user reported success, though. See https://bugs.freedesktop.org/show_bug.cgi?id=36555#c42

My config:

MS Access 2003 installed
Windows 7 / 32 bits
MS Jet OLE DB DLL (c:\windows\system32\msjetoledb40.dll) version 4.0.9756.0 dated 14/7/2009 03:15

Wilfried? Could you please give here details of your setup where you can access MS Access .mdb files with a daily MinGW build? Thanks in advance.
Comment 1 Winfried Donkers 2011-11-28 05:22:50 UTC
> Wilfried? Could you please give here details of your setup where you can access
> MS Access .mdb files with a daily MinGW build? Thanks in advance.

Lionel,

I downloaded daily build Win-X86@7-MinGW of 27 November and successfully connected to an MS Access 2000 database, just as I did with daily build MinGW-cross compilation of 22 November.
I work on a Windows XP machine.
I have no time to do further tests today, but will try to test more tommorrow; just tell what you want tested. (My own build still isn't successfull, I'll stick to daily builds for the time being. Any hacking from me will be Linux-based.)

Winfried
Comment 2 Lionel Elie Mamane 2011-11-28 05:51:11 UTC
(In reply to comment #1)
>> Wilfried? Could you please give here details of your setup where you can access
>> MS Access .mdb files with a daily MinGW build? Thanks in advance.

> I downloaded daily build Win-X86@7-MinGW of 27 November and successfully
> connected to an MS Access 2000 database.
> I work on a Windows XP machine.

Is Microsoft Office installed on that machine? What version? Please give us the version of the c:\windows\system32\msjetoledb40.dll file you have. Just right-click on it, take "properties" and it is in a tab called "details" or something like that.

Do you use a custom workgroup, or the default-at-installation one?
Comment 3 Winfried Donkers 2011-11-28 07:11:37 UTC
(In reply to comment #2)

> Is Microsoft Office installed on that machine? What version? Please give us the
> version of the c:\windows\system32\msjetoledb40.dll file you have. Just
> right-click on it, take "properties" and it is in a tab called "details" or
> something like that.
 
  Microsoft Office is not installed. We work with Libreoffice and have Access-files from before the migration. The Access-files have been made with Windows Office 2000. If you want to, I can search for the dll on other machines that still have Microsoft Office.
 
> Do you use a custom workgroup, or the default-at-installation one?

I don't understand your question, please explain.

Winfried
Comment 4 Lionel Elie Mamane 2011-11-28 07:56:58 UTC
Using Microsoft Jet to access a CSV file *also* hangs LibreOffice, but in a slightly different way: Clicking the "close window" (white-on-red cross) button does nothing. Right click on the task bar and "close all windows" closes LibreOffice without further confirmation, so not forced closure.

Example connection string for a CSV file:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\path\to\data.csv;Extended Properties=text;HDR=Yes;FMT=Delimited;
Comment 5 Lionel Elie Mamane 2011-11-28 08:10:51 UTC
(In reply to comment #3)
> (In reply to comment #2)

>> Is Microsoft Office installed on that machine? What version? Please give us the
>> version of the c:\windows\system32\msjetoledb40.dll file you have. Just
>> right-click on it, take "properties" and it is in a tab called "details" or
>> something like that.

> Microsoft Office is not installed.
> If you want to, I can search for the dll on other machines
> that still have Microsoft Office.

No, you should have that DLL, even on machines that don't have Microsoft Office. It is part of MSDAC (Microsoft Data Access Components), which you certainly have. Please give us the version of that DLL on the machine where you do your tests, and also of msjet40.dll.

>> Do you use a custom workgroup, or the default-at-installation one?

> I don't understand your question, please explain.

Well, then you don't use a custom workgroup, and we know enough for this bug. The "workgroup" is the file that lists MS Access's users and passwords for the permissions (access control lists) to the objects in a .mdb file.
Comment 6 Winfried Donkers 2011-11-28 22:45:37 UTC
(In reply to comment #5)
 
> No, you should have that DLL, even on machines that don't have Microsoft
> Office. It is part of MSDAC (Microsoft Data Access Components), which you
> certainly have. Please give us the version of that DLL on the machine where you
> do your tests, and also of msjet40.dll.
msjetoledb40.dll:
  file version 4.00.9502.0
msjet40.dll
  file version 4.00.9511.0

Also (in reply to comment #4):
connecting to a csv-file (Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Temp\test.csv;Persist Security Info=False) 'hangs' LibO. I can resize/move/minimise the window, but not close the application without forcing it.
Comment 7 Lionel Elie Mamane 2011-11-29 01:30:13 UTC
After more tests:

 - It hangs in MinGW build when MSVC build gives error message.

 - It works in MinGW build when it works in MSVC build: .mdb files, .csv/txt/tab files, ...

Adjusting bug summary appropriately.

My connection string for a CSV file was just wrong. The primary error was that one needs to put the path to the DIRECTORY where the file resides, and not to the file itself... Each file is then one table. Also, the HDR=.. and FMT=.. need to be *within* the 'Extended Properties', not outside of it, like in:

 Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\path\to\directory\;Extended
Properties="text;HDR=Yes;FMT=Delimited;";

Then there is the nitpicking about what the separator is (tab? comma? semicolon?), which I could only solve by creating a schema.ini file, the FMT=... does not seem to have any effect.

References for using Jet through ADO to connect to text files:
http://msdn.microsoft.com/en-us/library/ms974559.aspx
http://www.codeproject.com/KB/database/ReadTextFile.aspx
http://www.codeproject.com/KB/cs/UsingJetForImport.aspx

Example of a schema.ini file:
[data.tab]
Format=TabDelimited
[data.txt]
Format=Delimited(;)
Comment 8 Jochen 2012-08-19 11:33:37 UTC
IMHO all questions answered. Set status to "NEW".
Comment 9 Lionel Elie Mamane 2012-09-02 04:48:12 UTC
Reproduction instructions:

1) Launch New database wizard

2) choose connect to existing database: ADO

3) Next

4) Enter as connection string:

   Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\path\to\some\file\foo.ext;Extended Properties=text;HDR=Yes;FMT=Delimited;

5) Next / do not register / Open database for editing

6) click on "tables" in left pane
Comment 10 Jan Holesovsky 2014-06-17 04:26:17 UTC
The MinGW port is not maintained any more.
Comment 11 Amit Singh 2019-10-18 10:17:24 UTC Comment hidden (spam)