Apache OpenOffice (AOO) Bugzilla – Issue 69541
can't access database tables when linked spreadsheet file is missing - no error message
Last modified: 2007-08-08 13:10:56 UTC
To reproduce: 1. File->New->Database 2. Connect to an .xls (or probably .dbf, .csv, or other spreadsheet type) 3. Finish / save the .odb / exit 4. Rename or move the .xls (from #2) 5. Open the .odb 6. Click on Tables Actual behavior: Screen flickers Expected behavior: 1. An error message 2. It is possible to access Tables to edit the properties of the table to provide the new name of the .xls
I am not sure there should be an error message at all, as there is really no error IMO. When you create a Base file of type TEXT, dBf, or SpreadSheet you aren't actually linking the tables into the Base document. Instead you are just connecting to a specific directory. The content of that directory can change between invocations, or during even, an open session. I tested using 2.0.4 RC1. 1 ) created a directory named 'test_csv_gone_bye_bye' 2 ) copied three csv files into it 3 ) Created a database of type TEXT that connected to this directory. 4 ) open the Base document - tables screen shows me all three files as tables. 5 ) Closed Base file 6 ) Deleted all three files 7 ) re-open the Base file 8 ) Clicking on the tables icon now shows me a blank list of tables 9 ) closed Base file 10 ) Put the three files back in the directory 11 ) open Base file 12 ) Select tables view - see all three tables 13 ) deleted 1 file 14 ) tried to open the table representing the now deleted file and recieved an appropriate error message 'The data content could not be loaded'. 15 ) selected the menu 'View>refresh Tables'. The table representing the now deleted file is removed from the list of tables 16 ) Closed the Base file 17 ) removed the directory 'test_csv_gone_bye_bye' 18 ) Opened the Base file 19 ) Clicking on the tables icon generated the appropriate error message 'The connection to the datasource ... could not be established. I don't see the defect here.
So, the behavior is different with CSV files than .xls. With .xls, Base only allows me to select Queries, Forms, and Reports, but you can select Tables. >I am not sure there should be an error message at all, as there is really no >error IMO. When you create a Base file of type TEXT, dBf, or SpreadSheet you >aren't actually linking the tables into the Base document. Instead you are just >connecting to a specific directory. The content of that directory can change >between invocations, or during even, an open session An error message (a minimal solution) would at least explain to the confused user why it is not possible to access Tables. People generally expect an application to either obey a command or provide an explanation why it cannot. In this case, the reason can very much be not intuitive. What if someone else deleted your spreadsheet, for example? A non-technical person be scratching his head for a long time. Also, there seems to be only two ways to recover the Base document 1. Re-create the Base document from scratch, but that loses queries and column formatting. 2. Put a new spreadsheet in the same directory with the same file name, but that's neither convenient, intuitive, nor always possible. For example, what if the path refers to removable media or a network location that is no longer available? However, if the Tables Database Object were accessible, then the user could 1. Right click the table 2. Database->Properties 3. Provide the new path 4. Move on with life
It is my fault - I was thinking only of csv files. An xls connected as a spreadsheet is the file, not the directory. Testing just now with an xls file I see what you mean. The tables view does not chagne, and there is no error message. However, and this is with 2.0.4 RC1 still, I can edit the properties of the connection from the forms view of the Base window. I simply edited the filename in this dialog and was able to open the table again. Sorry for the confustion.
FWIW, with OOo 2.0.3 on Windows 2000, it is possible to view the path name of the .xls (as described by atjensen), but modification is disabled. >Sorry for the confustion. No problem. :)
confirming, assigning, targeting. Slightly adjusting the summary to reflect that this is about spreadsheets, and the missing error message. fs->oj: The Calc driver should wrap the exception caught from loadComponentFromURL into an SQLException. If there is no such exception in loadComponentFromURL, then we at least need to generate one saying "an unknown error occured while loading ...", or something like this.
*** Issue 53812 has been marked as a duplicate of this issue. ***
fixed in CWS dba23a find more information about this CWS, like when it is available in the master builds, in EIS, the Environment Information System: http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=SRC680%2Fdba23a
grabbing
targeting to 2.3, since the fix is part of a CWS aiming for this release
fs-> msc: please verify in CWS dba23a
Hi, this is fixed in the current master. The current master is available at http://download.openoffice.org/680/index.html I close this issue now. Bye Marc