Saving .dbf files

Discuss the spreadsheet application

Saving .dbf files

Postby rogerj67 » Wed Sep 17, 2008 9:32 am

I have to open, amend and save .dbf files in an application I use. When I open them in Open Office they pop up as a nicely formatted table in Calc. I then amend a few items and try to save the amendments back to the same file, or another, using Save or Save As. But each time I get an error dialogue saying the "connection to the file could not be established". I can't seem to get around this impasse, even if I try and open and save the file in Base. I can save it in .ods format but then my application won't read that!

Roger
OOo 2.4.X on MS Windows Vista + XP
rogerj67
 
Posts: 2
Joined: Wed Sep 17, 2008 9:18 am

Re: Saving .dbf files

Postby Villeroy » Wed Sep 17, 2008 1:42 pm

The headers contain some extra info indicating the type and the max. length of the respective field (dBase is a database format). If your editing does not match the type of data, Calc refuses to store the file sinse a database may be destroyed otherwise.
There was a bug in version 2.3 (or was it 2.4.0 actually?) where the field info was wrong. For instance, it indicated lenght=12 where in fact 13 was required. With this bug the file could not be stored with the same error you have quoted. 2.4.1 does not have this bug.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26541
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Saving .dbf files

Postby rogerj67 » Wed Sep 17, 2008 9:19 pm

Thanks very much. I noticed that the headers didn't look right but didn't realise the significance. Will look further into it.

Roger
OOo 2.4.X on MS Windows Vista + XP
rogerj67
 
Posts: 2
Joined: Wed Sep 17, 2008 9:18 am

Re: Saving .dbf files

Postby bigben » Mon Sep 22, 2008 9:26 am

Yes, i am back again and want to feedback testing OOo 3.0 RC1 on OS Win Vista Business x32 SP1.

It still has the bug ("connection to the file could not be established") even also on version 2.4.1. When editing .dbf file on header and try to save it and the error msg pop up. Example .dbf file with 1 hundred over records:
- On the header: COLA,N,10,2 and COLB,N,10,2 and COLC,N,9,2 and COLD,N,9,2 and COLE,N,6,2.
- Need to change to header: COLA,N,8,0 and COLB,N,8,0 and COLC,N,8,0 and COLD,N,8,0 and COLE,N,5,0.
- Save it and the error msg pop up.

FYI, no problem on OOo 2.3.0
Win Vista Business x32 SP2 & OOo 3.1.1. Win XP Pro SP3 x32 & OOo 3.1.1.
bigben
 
Posts: 12
Joined: Mon Jun 02, 2008 11:52 am

Re: Saving .dbf files

Postby Villeroy » Mon Sep 22, 2008 11:35 am

Yes, shure. You decreased the size of the databsae field. The size does can not take the data anymore. Any database program will likely fail to handle the respective field.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26541
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Saving .dbf files

Postby bigben » Wed Sep 24, 2008 6:49 am

Yes same problem also on OOo 3.0 RC2.

@Villeroy
But why OOo 2.3.0 no problem for that? I hope to dev teams that this function is really usefully for those play around the .dbf files, so pls do not degrade this function. PEACE
Win Vista Business x32 SP2 & OOo 3.1.1. Win XP Pro SP3 x32 & OOo 3.1.1.
bigben
 
Posts: 12
Joined: Mon Jun 02, 2008 11:52 am

Re: Saving .dbf files

Postby bigben » Thu Oct 09, 2008 3:45 am

FYI only.... Again... Yes same problem also on OOo 3.0 RC4.
Win Vista Business x32 SP2 & OOo 3.1.1. Win XP Pro SP3 x32 & OOo 3.1.1.
bigben
 
Posts: 12
Joined: Mon Jun 02, 2008 11:52 am

Re: Saving .dbf files

Postby Villeroy » Thu Oct 09, 2008 11:02 am

This is issue 87325, tagged as being resolved in 2.4.1. It has some more info on this matter than I can provide.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26541
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Saving .dbf files

Postby sclays » Mon Nov 17, 2008 6:00 pm

This issue persists in the "stable version" of OOO 3.0! How can I resolve it?
OOo 3.0.X on Ms Windows XP
sclays
 
Posts: 5
Joined: Thu Nov 06, 2008 11:06 am

Re: Saving .dbf files

Postby Villeroy » Mon Nov 17, 2008 8:02 pm

sclays wrote:This issue persists in the "stable version" of OOO 3.0! How can I resolve it?

I can not reproduce the problem anymore. How do you get to it? Do you understand the additional header information about the database fields?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26541
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Saving .dbf files

Postby sclays » Tue Nov 18, 2008 11:14 am

I open a .dbf-file (any .dbf-file) and I save it using another filename. This used to work under 2.4.1, but now it does not function anymore.
OOo 3.0.X on Ms Windows XP
sclays
 
Posts: 5
Joined: Thu Nov 06, 2008 11:06 am

Re: Saving .dbf files

Postby Villeroy » Tue Nov 18, 2008 12:36 pm

Works for me with the attached file and some larger ones I tried.
Attachments
dbase3.dbf.zip
Open edit save as ... dbf
(218 Bytes) Downloaded 96 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26541
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Saving .dbf files

Postby sclays » Tue Nov 18, 2008 11:53 pm

When using this file, opening it, changing even the slightest detail, NOT touching the header I reproduce the problem. Fact is that -even changing headers in 2.4.1 worked just fine.

(And open, save as ...dbf doesn't work neither)
Attachments
twegen.zip
twegen.dbf inside
(10.41 KiB) Downloaded 84 times
OOo 3.0.X on Ms Windows XP
sclays
 
Posts: 5
Joined: Thu Nov 06, 2008 11:06 am

Re: Saving .dbf files

Postby Villeroy » Wed Nov 19, 2008 8:20 am

[Tutorial] Reporting bugs or suggestions
Since the old issue is closed, you may open a new one and refer to the old one.
Meanwhile you can store your dbf file(s) in a dedicated database directory and connect a database document to that directory.
File>New>Database...
[X] Connect to existing
Type: dBase
Point to the dBase directory
[X] Register database (to access it from any Writer or Calc document)
Store database document
Add queries, forms and reports if you like.
From the left pane of the data source window you can drag tables and queries into Writer or Calc. You can also create data pilots from data sources.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26541
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Saving .dbf files

Postby bigben » Mon Feb 02, 2009 8:59 am

bigben wrote:Yes, i am back again and want to feedback testing OOo 3.0 RC1 on OS Win Vista Business x32 SP1.

It still has the bug ("connection to the file could not be established") even also on version 2.4.1. When editing .dbf file on header and try to save it and the error msg pop up. Example .dbf file with 1 hundred over records:
- On the header: COLA,N,10,2 and COLB,N,10,2 and COLC,N,9,2 and COLD,N,9,2 and COLE,N,6,2.
- Need to change to header: COLA,N,8,0 and COLB,N,8,0 and COLC,N,8,0 and COLD,N,8,0 and COLE,N,5,0.
- Save it and the error msg pop up.

FYI, no problem on OOo 2.3.0


bigben wrote:Yes same problem also on OOo 3.0 RC2.

@Villeroy
But why OOo 2.3.0 no problem for that? I hope to dev teams that this function is really usefully for those play around the .dbf files, so pls do not degrade this function. PEACE


bigben wrote:FYI only.... Again... Yes same problem also on OOo 3.0 RC4.


FYI only.... Again... Yes same problem also on OOo 3.0.0.

AND FINALLY... THIS PROBLEM SOLVED ON OOo 3.0.1 (Build:9379).
YES... THX ALOT TO ALL DEV TEAM.
Win Vista Business x32 SP2 & OOo 3.1.1. Win XP Pro SP3 x32 & OOo 3.1.1.
bigben
 
Posts: 12
Joined: Mon Jun 02, 2008 11:52 am

Re: Saving .dbf files

Postby Pandemonium » Thu Mar 26, 2009 1:58 am

Hello, I use the OpenOffice 3.0.1 and the problem is there. When i try to save, the same message is displayed (I use the spanish version) :

"Error al guardar el documento xxxxx:
No se ha podido establecer conexión con el archivo"

Pleas help me!!!!!!!!!!!!!!!
OOo 3.0.X on MS Windows Vista + Linux
Pandemonium
 
Posts: 2
Joined: Wed Mar 25, 2009 11:40 pm

Re: Saving .dbf files

Postby Villeroy » Thu Mar 26, 2009 6:14 am

dBase is a database in a directory and should be used in a database program. Innocent spreadsheet users can easily make the tables unusable for any database program. Excel does not care, Calc does.

Store your dbf files in a separate directory.
File>New>Database...
[X]Connect to existing database
Type: dBase
Point to your directory of dbf files.
[X] Register the database.
Store the database

Add queries define filter and sort criteria for single tables.
Add fancy input forms if you like.
Add reports for pretty printing.

Drag tables and queries into any office document, including Calc spreadsheets. The imported ranges are by far more useful as loading database tables directly into a spreadsheet. [Tutorial] Using registered data sources in Calc
If you still have problems with the column types, open the table in design mode (right-click>Edit...) and adjust the column type to fit your needs.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26541
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Saving .dbf files

Postby Pandemonium » Fri Mar 27, 2009 1:48 am

Villeroy wrote:dBase is a database in a directory and should be used in a database program. Innocent spreadsheet users can easily make the tables unusable for any database program. Excel does not care, Calc does.

Store your dbf files in a separate directory.
File>New>Database...
[X]Connect to existing database
Type: dBase
Point to your directory of dbf files.
[X] Register the database.
Store the database

Add queries define filter and sort criteria for single tables.
Add fancy input forms if you like.
Add reports for pretty printing.

Drag tables and queries into any office document, including Calc spreadsheets. The imported ranges are by far more useful as loading database tables directly into a spreadsheet. [Tutorial] Using registered data sources in Calc
If you still have problems with the column types, open the table in design mode (right-click>Edit...) and adjust the column type to fit your needs.


Thanks for your help, now i understand how it works the new version with database. ;)

Saludos de Costa Rica
OOo 3.0.X on MS Windows Vista + Linux
Pandemonium
 
Posts: 2
Joined: Wed Mar 25, 2009 11:40 pm

Re: Saving .dbf files

Postby RogerBrown » Wed May 06, 2009 10:43 pm

What if the .dbf file you are using is a part of a .shp file, will moving it into another directory screw it up?
OOo 3.0.X on Ms Windows XP
RogerBrown
 
Posts: 2
Joined: Tue May 05, 2009 11:56 pm

Re: Saving .dbf files

Postby lads » Fri Jul 03, 2009 1:01 pm

Hello,

OO 3.0.1 on Jakalope here. So far I haven't been able to open or save any dbf files, getting the same "connection to the file could not be established" error. I read this and other threads on the matter without finding anything that would help.

I followed this tutorial on creating dbf files:

http://wiki.services.openoffice.org/wik ... ase_(xBase)

Inserting the following in a new spreadsheet:

Item,C,20 Purchased,D Cost,N,10,2
Chair 10/22/01 98
Table 09/16/00 483

Results in exactly the same error when I try to save as dbf.

Thanks for any help on this.
OOo 3.0.X on Ubuntu 8.x + Vista
lads
 
Posts: 4
Joined: Fri Jul 03, 2009 12:02 pm

Re: Saving .dbf files

Postby Villeroy » Fri Jul 03, 2009 2:42 pm

I copy your data from the browser.
Code: Select all   Expand viewCollapse view
Item,C,20 Purchased,D Cost,N,10,2
Chair 10/22/01 98
Table 09/16/00 483

Paste special as unformatted text with the date column as "Date (MDY)" or "English(US)".
Save the active sheet as /tmp/test.dbf without any warning.
I connect a database to the dBase directory /tmp.
I open the table and see all data in perfect shape with correct dates in my German locale and 2-digit decimals.
I open the table in edit mode and see the following fields and properties:
Code: Select all   Expand viewCollapse view
ITEM  VARCHAR  length=20
PURCHASED DATE
COST  DECIMAL lenght=8, decimals=2

Just a perfect dBase export as specified in Calc's column headers.

May be your data are not what they seem to be or just another bug in your distributor's BrokenOffice.org.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26541
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Saving .dbf files

Postby lads » Fri Jul 03, 2009 3:27 pm

Villeroy,

I followed exactly your instructions but still get the above mentioned error.

What's the version you are using? Mine says:

OpenOffice.org 3.0.1
OOO300m15(Build:9379)
OOo 3.0.X on Ubuntu 8.x + Vista
lads
 
Posts: 4
Joined: Fri Jul 03, 2009 12:02 pm

Re: Saving .dbf files

Postby Villeroy » Fri Jul 03, 2009 3:33 pm

OOO310m11 (build:9399)
(C) Sun Microsystems Inc.

I don't think it's a matter of versions unless you use a certain outdated version. What the Linux distributors distribute is based on http://go-oo.org and comes with some extra features and a full basket of surprising bugs.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26541
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Saving .dbf files

Postby lads » Fri Jul 03, 2009 3:38 pm

Ok,

This problem is reported in a few other places without any solution coming about. Could it be an issue accessing the file system, e.g. the OpenOffice process not having sufficient permissions?

Thanks.
OOo 3.0.X on Ubuntu 8.x + Vista
lads
 
Posts: 4
Joined: Fri Jul 03, 2009 12:02 pm

Re: Saving .dbf files

Postby Villeroy » Fri Jul 03, 2009 3:45 pm

With a simple local file system under Linux this should never be an issue. By default you have full access to your own files you can freely store in your home directory or in /tmp.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26541
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Saving .dbf files

Postby lads » Mon Jul 06, 2009 11:44 am

So this must be a bug. How do I report it? Thanks.
OOo 3.0.X on Ubuntu 8.x + Vista
lads
 
Posts: 4
Joined: Fri Jul 03, 2009 12:02 pm

Re: Saving .dbf files

Postby Villeroy » Mon Jul 06, 2009 12:21 pm

[Tutorial] Reporting bugs or suggestions
Before filing an issue, you may attach a copy of what you try to save as dbf to this thread using the native ods format.
[Forum] How to attach a document here
In any case, the Base component is the better tool to handle dbf files, which are database tables by design. [Solved] Best way to import info from dbf files
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26541
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Calc

Who is online

Users browsing this forum: No registered users and 22 guests