No new records can be created no matter what settings are used.

Bug #1427401 reported by launchpadmember
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sqlitebrowser (Ubuntu)
New
Undecided
Unassigned

Bug Description

Specifications:
OS: Xubuntu 14.04
Desktop: XFCE 4.10
Package: sqlitebrowser v2.0b1

Description of problem:
1.) After using sqlitebrowser to open the camera database contained within a github project called "osm-bundler" (where the database being opened can be found here):
https://github.com/HaiyangXu/osm-bundler/blob/master/osmbundler/cameras/cameras.sqlite
2.) The "Browse Data" tab is selected and a view of the types of cameras shown in the database is listed.
3.) A camera must be added to this database so the "New Record" button is selected in order to create a new record.

What is expected to happen:
A dialogue or window or something should open asking me for the information to be placed in the new record, or a new blank record should be created such that its blank cells could be modified to hold the new data the user wishes to input.

What happens instead:
A window pops open with an incorrect error message stating the following:
---- Error message begins ----
Error adding record, make sure a table is selected.

If the table contain fields declared as NOT NULL
please select EDIT->PREFERENCES and adjust the
default value for new records to insert an empty string.
---- Error message ends ----

Notes on the above error:
Where the above error message occurs even though there is only one table to select and it is selected in the table drop down list located in the upper left area of the programs window, and this error message is also happening regardless of the fact that under the settings "EDIT -> PREFERENCES" the "default value for new records" has been set to be "an empty string".

Concise description of the problem:
In short, there is no way to stop the error message from happening when attempting to create a new record in the database and as a result no new records can be created.

For completeness here is the following requested information:
lsb_release -rd
Description: Ubuntu 14.04.2 LTS
Release: 14.04

sudo apt-cache policy sqlitebrowser
sqlitebrowser:
  Installed: 2.0.0~beta1+ds.1-3
  Candidate: 2.0.0~beta1+ds.1-3
  Version table:
 *** 2.0.0~beta1+ds.1-3 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status

no longer affects: sqlite
Revision history for this message
launchpadmember (lpuser1138) wrote :

A work around for creating a new record is as follows:
1.) Export the current database as a text file by doing the following:
    1.a.) File --> Export --> Database to SQL file
    1.b.) In the "save as" dialog choose location and file name using the ".txt" file extension to save the file as.
2.) Open the text file saved in step 1.b. above in a text editor and find the line where you would like to insert an record.
3.) Make sure the record being inserted has the same format as other records in the text file form of the database.
4.) After inserting your record (by typing it in) save the file and close it.
5.) Go back into sqlitebrowser and perform the following task:
    5.a.) File --> Import --> Database from SQL file
    5.b.) In the "open" dialog browse to the location where you saved the text file from step 4. above and open it here.
6.) A dialog will open asking if you wish to create a new database file to hold the imported data.
    6.a) Answer "Yes" and save the database in the same location as the current database with a different name.
    6.b.) If you answer "No" sqlitebrowser will crash.
    6.c.) If you answer "Yes" but attempt to save the database over the current database being used, you will get a dialog stating the following: "File /path/to/your/database/your_database.sqlite already esists. Please choose a different name" with the only option here being an "OK" button. Selecting this button takes you back to the sqlitebrowser where you will have to start over from step 5. above.
7.) Once you have completed step 6.a. above close sqlitebrowser and delete the record of the current database you were attempting to change.
8.) Rename the database saved in step 6.a. to the name of the database that was deleted in step 7.

Once step 8 is completed, you have now successfully added a new record to the database via export and import operations. You can open the newly renamed database in sqlitebrowser and if you've followed the above steps correctly you should have a new record located in the database exactly where you placed it in steps 2 through 4 above.

This post is currently the only solution for creating a new record until the "new record" button gets fixed as per the original post's bug report.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.