Issue 107452

Summary: Table designer loses exisitng default value when field is modified.
Product: Base Reporter: sublifer <sublifer>
Component: codeAssignee: ocke.janssen
Status: CLOSED IRREPRODUCIBLE QA Contact: issues@dba <issues>
Severity: Trivial    
Priority: P3 CC: issues, r4zoli
Version: OOo 3.1.1Keywords: needmoreinfo, oooqa
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
database.odb This is the original file the issue was noticed on
none
new database.odb This is the db created and saved into My Doc's none

Description sublifer 2009-12-04 17:59:57 UTC
I was trying to create a database for a small inventory system.  The database
file was made and is kept on a networked drive (AD NTFS share) while editing the
table I would make changes to default values and descriptions then as I finished
I clicked the save button on the menu bar or the "save" option under the "File"
menu. Instead of saving it reverted my changes. I first found this behavior in
OOo 3.0.1 and upgraded to 3.1.1 and it still exists. Also, smallint and tinyint
field types would end up showing a length of zero. Also, the length value
refuses to be modified for any integer field type (INTEGER, SMALLINT, TINYINT).
Since I cannot make changes to the table the database program is useless to me.
I would be happy to share the affected database file or even perform further
testing to check other scenarios.  Thanks, John
Comment 1 r4zoli 2009-12-05 12:14:23 UTC
The database file opened from network, which has a problem. you have a full
right on this folder?

When you opens your file on network, the lock file (same name as odb with .lck
as file extension) can be found next to the odb file?

What happens if you open the same file from your computer, not from network.

> I would make changes to default values and descriptions then as I finished.
Default values come from table wizards?

When you saved changes in table design view it saved, and under the main menu
failed?

Please follow the issue tracker rules:
http://qa.openoffice.org/issue_handling/basic_rules.html
Upload your file if not contain sensitive data.
Comment 2 sublifer 2009-12-08 16:17:05 UTC
I do have full rights on the folder.  I am testing the db from the PC desktop as
I type this.

The same db copied from its original place on the network to my desktop, then
opened and tested exhibits the same behavior, it won't save anything. This db
was originally partially created then saved to the network folder, it was not
saved anywhere else before.  I don't know if the location of the temp/lck file
has something to do with this.

I created another db from my PC, partially created it then saved it to My
Documents folder.  It appears to save changes after it is reopened and edited
but it only appears to save the field type.  It will not retain the default
values nor description for the field (which I assume is supposed to be visible
on mouse-overs). It appears to save it as in it doesn't clear itself when I
click to save but after closing the db and reopening it the default value is
empty as well as the field descriptions.

The lock file: when I open any of the db's, the lock file is not created until I
go to the tables view.

default values: in the table designer, when editing a field, in the lower
portion of the screen where the field details are you can change what the
default value for the field should be (for use in forms). That is the default
value that is not being retained. for example, I create a varchar field named
CPUmfg and set the default value to Intel.  It is not retained

"When you saved changes in table design view it saved, and under the main menu
failed?"  I don't quite understand this question. From the table designer, after
I make my changes I can either click save from the toolbar or go to the
drop-down file menu and choose the save option.  Neither of them work.  

Also, when I exit the table designer after making changes and saving them, the
save options are greyed out like as if its already been saved or no changes were
made.  If I go back into table designer the changes are still there.  When I
completely exit the db and go back in the changes are gone.  (going back in the
process, instead of simply closing it, I can start with a "save as" and save it
over the same database then exit it, but when I reopen the db and then go into
table designer my changes are gone again.
I will upload both databases (if it lets me) the original one that was initially
used over the network is simply called "database" the new one is named "new
database"
Comment 3 sublifer 2009-12-08 16:19:19 UTC
Created attachment 66552 [details]
database.odb  This is the original file the issue was noticed on
Comment 4 sublifer 2009-12-08 16:20:25 UTC
Created attachment 66553 [details]
new database.odb  This is the db created and saved into My Doc's
Comment 5 drewjensen.inbox 2009-12-30 02:48:01 UTC
@sublifer Please, if you could - it works best to keep discussion in an issue to
one issue. Here the isssue is IMO that you can not work with a Base file, using
an embedded HSQL database, when that file is stored on an NFS disc.

Will change summary to match if that is still the case?

OK - that said, one of your questions may hold a clue here.

"The lock file: when I open any of the db's, the lock file is not created until
I go to the tables view."

yes that is by design. The lock file is created when a connection is made to the
database - which doesn't happen till needed.

If you query the issue tracker here for NFS locking problems there are a few
outstanding. A few example

http://qa.openoffice.org/issues/show_bug.cgi?id=51903
http://qa.openoffice.org/issues/show_bug.cgi?id=107511

Ok - so one thought. You need not only full rights to existing files on the disk
but also the ability to create the lock file, after the .odb file has been
'opened'. You mention the lock files but not explicitly that you see them on the
NFS volume. If you open a Base file, go to the table secton and check is the
.lck file created?

Another queston - You are using Samba, yes? No?

One last question. This has never worked for you, right. It wasn't that it was
working and stopped with the upgrade to 3.0.1 from an earlier release?
Comment 6 drewjensen.inbox 2010-03-07 17:35:09 UTC
Ok let us work with one issue at a time.
Checked w/ XP, OOo3.2

To reproduce.
Download and open the first example database.
Open the table editor for table "Inventory"
Change the field length for field "Locaton"
Save the changes.

The existing string in the 'Default value' property is lost.
Comment 7 ocke.janssen 2010-07-15 06:21:58 UTC
Could someone test this in a current version I used a DEV300_m84/OOO330_m0 and
the error doesn't occur anymore.
Comment 8 Mechtilde 2010-07-21 11:23:29 UTC
worksforme -> closed