Page 1 of 1

[Solved] Edit address book database

Posted: Wed Aug 23, 2017 12:32 am
by AsherRuchie
A while ago I created an address book which I use in OO writer. It is an ODB file. Now I would like to edit some entries and add new ones. When I go into OO it brings up the ODB file and allows me to see it but not edit it. It has a screen called "Table Data View", but won't allow editing. When I use the Writer "Data Sources" (F4) I can also access the address book, but I can't make any changes. Any ideas?

Thanks,
AS

Re: How to edit my ODB file

Posted: Wed Aug 23, 2017 5:10 am
by MrProgrammer
AsherRuchie wrote:I can also access the address book, but I can't make any changes. Any ideas?
OpenOffice Help wrote:Registering an Address Book
In OpenOffice.org you can register different data sources. The contents of the data fields are then available to you for use in various fields and controls. Your system address book is such a data source.
OpenOffice.org templates and wizards use fields for the contents of the address book. When activated, the general fields in the templates are automatically replaced with the fields from the data source of your address book.
In order for the replacement to take place, you must tell OpenOffice.org which address book you use. The wizard asking for this information appears automatically the first time you activate, for example, a business letter template. You can also call the wizard by following the steps listed below.

The address book data is read-only in OpenOffice.org Base. It is not possible to add, edit, or delete address data from within Base.

Re: How to edit my ODB file

Posted: Wed Aug 23, 2017 5:22 am
by AsherRuchie
Thanks. How can I edit the Address Book when people move etc. Is there another program that I can use if OO Base won't allow it???

Re: How to edit my ODB file

Posted: Wed Aug 23, 2017 10:39 pm
by UnklDonald418
You mention your data source is "Table Data View" which implies that your data source is a View. Views are actually a query disguised to look like a table and data supplied by a View cannot be edited using the View. Any edits would have to be to the data source supplying the View.
What did you use to create your address book?

Re: How to edit my ODB file

Posted: Fri Aug 25, 2017 12:37 pm
by Villeroy

Re: How to edit my ODB file

Posted: Sat Aug 26, 2017 10:19 am
by keme
AsherRuchie wrote:Thanks. How can I edit the Address Book when people move etc. Is there another program that I can use if OO Base won't allow it???
You may have Base connected to the Windows Contacts app. Then I guess you have to use that to edit your data.

Re: How to edit my ODB file

Posted: Wed Aug 30, 2017 11:17 pm
by AsherRuchie
I actually don't remember how I created the .odb file. Is there any way to find out? Any other way to create an editable file from my .odb file? This is quite frustrating!

Re: How to edit my ODB file

Posted: Thu Aug 31, 2017 12:49 pm
by Villeroy
The status bar of the database document indicates the connection type.

Re: How to edit my ODB file

Posted: Thu Aug 31, 2017 11:12 pm
by UnklDonald418
Any other way to create an editable file from my .odb file?
Yes, you can create a new table but any edits will only be to that table. The original data will not be affected.

First look in the lower left corner of your database window. If it says Enbedded database then you are good to go. If it says something else you may need to create a new Database to hold the new table.
From the database window click on the Tables tab and select and select “Table Data View”. Press <Ctrl>C to copy it to the clipboard and then <Ctrl>V to paste the clipboard contents. Note that if you had to create a new Database then paste into the Tables area of the new database instead of your original database.
A Copy Table dialog should be displayed.
Change the Table Name to something other than “Table Data View”
Under Options select “Definition and data”
Then click on the checkbox next to Create primary key and leave the default Name as “ID”
Next click on Create and a new table with the name you chose will be created and filled with the data from “Table Data View”.
The new table can now be edited, but remember the edits will only be saved into the new table you created.

Re: How to edit my ODB file

Posted: Sun Jul 29, 2018 11:07 pm
by masterrrusty
It seems as though you are saying here that ODB is not really a database per se. It is a "data reader" that allow you to view and utilize data from other sources. So therefore, if you want to edit the "data" you need to go to the "source" and edit it there.

So if I go back to the spreadsheet that I created an address book from and add a column a new data field will appear in ODB. Is that correct?

Re: How to edit my ODB file

Posted: Mon Jul 30, 2018 1:46 am
by UnklDonald418
It is a "data reader" that allow you to view and utilize data from other sources. So therefore, if you want to edit the "data" you need to go to the "source" and edit it there.
Yes, Base is a front end for a database engine, for an Embeddded database its HSQLDB version 1.8 .
So if I go back to the spreadsheet that I created an address book from and add a column a new data field will appear in ODB. Is that correct?

No, you would need to use the process I described earlier to create a new table. Calc has no way of directly communicating any changes to the HSQLDB database engine.
However, Calc can use data supplied by the Base front end, as a Data source. When you press F4 on a Calc spreadsheet you will get a dialog that allows you to chose tables and queries from registered Base databases. Changes made to data in a database table can automatically show up on a spreadsheet, but, it doesn't work the other way around.

In an Embedded database everything is stored in the .obd file, which is actually a zip archive with the tables, queries, forms and reports all stored in a compressed format. If something goes wrong with the zip process, an .obd file can become corrupt and all the data is lost! So, when using an Embedded database, regular backups are extremely important.

Re: How to edit my ODB file

Posted: Mon Jul 30, 2018 8:17 am
by Villeroy
A dBase connection is editable.

1) Create a dBase directory.
2) Save the spreadsheet as dBase (*.dbf) in that directory. This will only save the active sheet. Close the spreadsheet document.
3) Open your Base document, call menu:Edit>Database>Connection..., change the connection type from spreadsheet to dBase with the directory as source location. Each dbf file reporesents one database table. Of course you may create a new Base document for this connection but redirecting the spreadsheet connection preserves any queries, forms, reports and the database registration.

This connection does not provide full database functionality but the tables are editable in Base and in the data source window. dBase is much faster, particularly when you add indices. Dozends of applications can handle dBase files. You can store many millions of rows in one table.