Issue 118575 - OOo Base will not reopen a database after I have created a new Query in it.
Summary: OOo Base will not reopen a database after I have created a new Query in it.
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 3.3
Hardware: PC Windows 7
: P5 (lowest) Major (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2011-11-04 12:10 UTC by Bill Barker
Modified: 2013-01-29 21:47 UTC (History)
2 users (show)

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


Note You need to log in before you can comment on or make changes to this issue.
Description Bill Barker 2011-11-04 12:10:46 UTC
I have created a database for vehicle fleet management. I have just created a new query to "bring back" a list of all items in the Asset table(there are 67 items). Once created and run I click on the "save" icon. When I close Base later I cannot reopen the database. I have backups saved so can get back to where I was before - but each time I create the same Query it all happens again. I have other Queries that run fine. OOO330m20 (Build 9567) on a Windows 7 PC.
Comment 1 r4zoli 2011-11-05 16:35:35 UTC
Please give more details.
You created odb file with built-in HSQLDB (check status bar)?
Or you connected to MySQL?

Which query cause crash? 
Please add query script to your next comment here, or attach whole odb file without data, to allow us to see the query.
Comment 2 Bill Barker 2011-11-07 11:55:13 UTC
I used HSQL database engine - Ooo Base - to create the Tables, Queries etc. All other queries run fine - only this one causes the problems.
Comment 3 Bill Barker 2011-11-07 12:06:19 UTC
I have attempted to send an attachment (Word doc with screen shots of issue) but "Submit" has no effect. No error message though.
Comment 4 r4zoli 2011-11-07 12:38:10 UTC
If you can not upload the attachment, please copy query script into comment.
Comment 5 Bill Barker 2011-11-08 12:11:45 UTC
Understood. Oddly, whilst I was getting things ready to send to you I discovered that if I copy the "populated" database (which no longer has the query in it) and strip all data and then write the query again the "empty" database opens OK. I will do a bit of testing on the "empty" and the "populated" databases with the query in question(and maybe other new ones too). 

Query script is simple: -

SELECT "Assets"."AssetID" AS "AssetID", "Assets"."Category" AS "Category", "Assets"."Make" AS "Make", "Assets"."Model" AS "Model", "Assets"."RegistrationNumber" AS "RegistrationNumber", "Assets"."CurrentAsset?" AS "CurrentAsset?" FROM "Assets" "Assets" WHERE ( "Assets"."CurrentAsset?" = 1 ) ORDER BY "Assets"."RegistrationNumber"
Comment 6 r4zoli 2011-11-08 13:02:50 UTC
Using question mark "?" in database object (table, field, query, report) name is not a good practice. Use letters a..Z, numbers, 0..9, and underscore "_" only. This will not cause problems, other characters can be problematic.
Comment 7 Bill Barker 2011-11-09 11:10:11 UTC
Many thanks for that advice. I will try that change and advise.
Comment 8 Bill Barker 2011-11-10 11:31:00 UTC
Latest state is that I have renamed the fields that had a "?" in the title. All appeared to be stable. I re-wrote the original query and it worked OK - closed the database and reopened it a number of times. I then produced a report based upon the query and I am back to square one - the new database copy with the report in it will not open, but the one with the query in it will! Let me play around and see if I can find anything obvious. I have tried to attach the odf file without data but attachments have not got through to you before.
Comment 9 Bill Barker 2011-11-29 12:29:11 UTC
Latest status:
I have got around to running some tests on queries and reports in my OOo Base Asset management database. It appears that it is not sufficient to simply "Save" by clicking on the icon. You have to "File" / "Save As" and replace the existing file with the new version (or if you have as little faith as I, create a new version). That appears to overcome the issues. I have created queries and reports, saved them as above, and then closed and re-opened the file successfully. If I only click on the "Save" icon and close the file I cannot reopen it.