Issue 69541 - can't access database tables when linked spreadsheet file is missing - no error message
Summary: can't access database tables when linked spreadsheet file is missing - no err...
Status: CLOSED FIXED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 2.0.3
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.3
Assignee: marc.neumann
QA Contact: issues@dba
URL:
Keywords:
: 53812 (view as issue list)
Depends on:
Blocks:
 
Reported: 2006-09-14 21:32 UTC by aziem
Modified: 2007-08-08 13:10 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description aziem 2006-09-14 21:32:49 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
Comment 1 drewjensen.inbox 2006-09-14 22:31:25 UTC
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.
Comment 2 aziem 2006-09-14 22:52:30 UTC
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
Comment 3 drewjensen.inbox 2006-09-15 00:02:38 UTC
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.
Comment 4 aziem 2006-09-15 00:06:33 UTC
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.  :)
Comment 5 Frank Schönheit 2006-09-18 08:49:26 UTC
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.
Comment 6 Frank Schönheit 2006-09-21 11:16:57 UTC
*** Issue 53812 has been marked as a duplicate of this issue. ***
Comment 7 Frank Schönheit 2007-03-07 13:57:51 UTC
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
Comment 8 Frank Schönheit 2007-03-07 13:58:39 UTC
grabbing
Comment 9 Frank Schönheit 2007-03-15 09:45:22 UTC
targeting to 2.3, since the fix is part of a CWS aiming for this release
Comment 10 Frank Schönheit 2007-03-21 14:07:37 UTC
fs-> msc: please verify in CWS dba23a
Comment 11 marc.neumann 2007-04-17 13:43:08 UTC
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
Comment 12 marc.neumann 2007-08-08 13:10:56 UTC
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