Problems opening an existing Base file

Issues with installing under all Linux Distributions

Problems opening an existing Base file

Postby taimic » Sun Jan 06, 2008 6:09 pm

(Running Linux)
I'm trying to create a database. The database wizard worked fine, but the Table wizard didn't open at all, so I created the Table in the Design View, which seemed simple enough. However, because I am new to this software, I did not create a primary key specifically (I assumed my first field would be the primary key). I entered a bogus record to start things off, then closed the file.

Now when I get back into Base, it doesn't recognize the table that I created--when I try to open it (it was saved as a .dbf file for some reason), the thing opens in Calc. When I ask to view only database files in the Open Files window, the table file does not show up in the list.

I'm concerned that if I go through the same process of creation again, I'll have the same problem--not being able to reopen the file. Does anyone have any idea either a) how I can open the file I created or b) how to create a table so that it saves as a database table and not a spreadsheet?

Many thanks!

taimi
taimic
 
Posts: 4
Joined: Sun Jan 06, 2008 5:58 pm

Re: Problems opening an existing Base file

Postby Villeroy » Sun Jan 06, 2008 6:49 pm

Open the database document (*.odb) and tell us the type of database as indicated on the left side of the status bar.
What does Menu:Help>About OpenOffice.org say about the creator of the software. Is it created by Sun or by your Linux-distributor?
What can you tell us about your Java runtime? Menu:Tools>Options>Java (+wait some seconds) shows availlable runtimes and the one currently used by OOo.

In general there are three types of databases.
1: The default type uses a special embedded version of the hsql database engine http://hsqldb.org/. All it's data (tables) are stored within the database document (*.odb). The statusbar shows "Embedded database | HSQL database engine".
2: Connections to "real database engines" like mySQL, PostgreSQL, Microsoft SQL Server, Oracle. The data are provided by an external driver (odbc or jdbc) which knows how to log-in, connect and communicate with the database engine.
3A: Connections to "some kind of tabular data" like text tables (*.csv), spreadsheets, address books (thunderbird, outlook, evolution) and others. OOo comes with several of it's own drivers which provide sortable and filterable read-only views on external data.
3B: dBase is somewhat special because OOo's dBase driver provides read-write access and tables can have indices.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 27366
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Problems opening an existing Base file

Postby taimic » Mon Jan 07, 2008 1:45 am

Thanks for the questions :idea:

1. dBASE database
2. A Sun product, created by Gentoo Foundation based on OOo build 2.3.0.1.90
3. Apparently, there are no Java runtime environments installed...or at least, the list of "JRE's already installed:" is blank

I haven't used a decent database in years, so my knowledge is vastly outdated.
taimic
 
Posts: 4
Joined: Sun Jan 06, 2008 5:58 pm

Re: Problems opening an existing Base file

Postby foxcole » Mon Jan 07, 2008 6:01 am

taimic wrote:3. Apparently, there are no Java runtime environments installed...or at least, the list of "JRE's already installed:" is blank.

How long are you giving it to populate? OOo is searching the computer for Java environments, and on my Windows system, this list takes a full minute to populate, sometimes longer. (JREs can be downloaded and installed with programs that require specific versions of Java, so it's possible that these files exist in different locations. OOo is retrieving all usable JREs.)

But don't rely on that to tell you whether you have JREs installed. You can search your computer for files containing the string 'jre' and come up with all existing versions. Then if needed you can manually add these in the Tools> Options> OpenOffice.org> Java dialog, with the Add button.
Cheers!
---Fox

OOo 3.2.0 Portable, Windows 7 Home Premium 64-bit
User avatar
foxcole
Volunteer
 
Posts: 1507
Joined: Mon Oct 08, 2007 1:31 am
Location: Minneapolis, Minnesota

Re: Problems opening an existing Base file

Postby Villeroy » Tue Jan 08, 2008 1:13 am

The wizzards depend on Java and you need Java to work with the native database engine hsqldb which is written entirely in Java.
You can not use existing dBase tables and indices as a relational database. dBase in Base is fine if you want to filter or sort large amounts of data in flat tables. The tables are editable, but we can not set up relations between them. There are no functions availlable except count(*) returning a table's record count.
The classical dBase is a database in a directory. This is why you specify a directory rather than a file when you connect Base to an existing dBase. Each *.dbf within this directory represents a table in Base, *.ndx files represent indices. In Base Menu:Edit>Database>Properties... shows the path of the connected dBase directory and some other settings. When you edit the tables and indices you edit files in the connected directory. Queries, forms and reports are saved in the Base file.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 27366
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Problems opening an existing Base file

Postby taimic » Tue Jan 08, 2008 4:57 pm

foxcole wrote:How long are you giving it to populate?


Several minutes

foxcole wrote:You can search your computer for files containing the string 'jre' and come up with all existing versions. Then if needed you can manually add these in the Tools> Options> OpenOffice.org> Java dialog, with the Add button.


This was odd. I only found one version in two places: sun-jdk-1.5.0.12 And I could only add the directory as a class path--it still doesn't show up in the list of installed runtimes.

Does the potential lack of Java really account for why I can't open a .dbf database table in Base?

thanks
taimic
 
Posts: 4
Joined: Sun Jan 06, 2008 5:58 pm

Re: Problems opening an existing Base file

Postby taimic » Tue Jan 08, 2008 5:05 pm

Villeroy wrote:You can not use existing dBase tables and indices as a relational database. dBase in Base is fine if you want to filter or sort large amounts of data in flat tables. The tables are editable, but we can not set up relations between them. There are no functions availlable except count(*) returning a table's record count.


Now I'm even more confused. I don't seem to have a choice in Base as to what Kind of database I create. When I create a new database, it creates the .odb file and the dBase folder. A table created for the database is saved as a .dbf within the dBase folder--and I can't save the table as anything else.

All this wouldn't be a problem, of course, if I could simply access the same .dbf table in Base to add or manipulate the data--but the .dbf file won't open in Base. The system sees it as a spreadsheet and opens it in Calc.

Maybe I need to install Java somehow???

thks
taimic
 
Posts: 4
Joined: Sun Jan 06, 2008 5:58 pm

Re: Problems opening an existing Base file

Postby Villeroy » Tue Jan 08, 2008 5:25 pm

taimic wrote:Does the potential lack of Java really account for why I can't open a .dbf database table in Base?

thanks

I disabled Java in OOo options and restarted the office. Then I opened a new doc (Writer or Calc) and hit F4. The datasource pane shows:
1. Example database "Bibliography" with table "biblio" of type dBase. I can open the Base document from the context menu and see the properties of the dBase connection. The directory is ~/.openoffice.org2/user/database/biblio
2. another fully functional dBase source
3. Mozilla address books from my default profile in Thunderbird
4. a csv source
5. a test datasource of embedded type hsql which is inaccessible since hsql requires Java.
Error Message wrote:"The connection to the data source "test" could not be established."
SQL Status: HY000

The connection to the external data source could not be established. No SDBC driver was found for the given URL.

A connection for the following URL was requested: sdbc:embedded:hsqldb


When I try to call a wizzard from within a working data source I get
Error Mesage wrote:OOo requires a JRE to perform this task. However, use of a JRE has been disabled. Do you want to enable the use of a JRE now?


My Base component works pretty well as far as no Java is required. However, I always replace any distributor's build with an original Sun build.
You are using a binary made by the Gentoo folks. I don't understand what the Linux distributors are doing to OOo and why, but they are doing it badly.

Edit: Before you start stirring your hard disk with JRE and several flavours of OOo:
Open the Base file
Note Menu:Edit>Database>Properties... <directory of dBase>
See what is in that directory. If there are *.dbf files they should open in Calc and they should be visible in the tables container of the Base file.
If you want to make the tables and queries accessible from Calc/Writer/Impress you need to register the Base file at Menu:Tools>Options>Base>Databases. This registration does not change anything in your database. You may have hundreds of Base files, but only registered ones are usable as datasources in the other components.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 27366
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest