.dbf Connection to file not be established. Help!

Discuss the spreadsheet application
Post Reply
mauro
Posts: 2
Joined: Sat Jun 21, 2008 5:48 pm

.dbf Connection to file not be established. Help!

Post by mauro »

Hello:
My OpenOffice Version 2.4.1 in Windows Vista.
If I try save a .dbf in calc I get: prompt out the error msg: "Error saving the document Untitled1: Connection to the file could not be esxtablished".

I saw this is a bug in forum:
Re: DBase export error in OpenOffice.org Calc 2.4
Postby Villeroy on Mon Jun 02, 2008 12:20 pm
This is a known bug in 2.4 to be fixed in 2.4.1 due to be released this month.
http://www.openoffice.org/issues/show_bug.cgi?id=87325

but I get the same error in Openoffice 2.4.1 and Vista.

Can You help Me ?
Thanks,
Mauro
OOo 2.4.X on MS Windows Vista
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: .dbf Connection to file not be established. Help!

Post by Villeroy »

I can't reproduce the bug anymore as I could with 2.4.0. Are you shure about your version? Menu:Help>About should report "OpenOffice.org 2.4.1".
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
bigben
Posts: 12
Joined: Mon Jun 02, 2008 11:52 am

Re: .dbf Connection to file not be established. Help!

Post by bigben »

I have to feedback some of bit. OK. Currently i use OOo 2.4.1. Tested on Win Vista Business 32bit & XP Pro 32bit.

I don't get error msg when i do save as to .dbf file (for case file originated .xls), and it was solved in the forum http://user.services.openoffice.org/en/ ... f=9&t=6341. BUT when i try to save open .dbf file, and again the error msg come up. Example, i open file called 'Test.dbf' and 'Data.xls'. I copy the data from 'Data.xls' and paste into 'Test.dbf' and then i click save button. Error msg will come up. If i edit some of bit data in fews, then there is no error. Something like the error msg come up on editing bulk data in one time (example editing hundred of rows).

N.B. : No issue if on OOo Calc 2.3.0.
Win Vista Business x32 SP2 & OOo 3.1.1. Win XP Pro SP3 x32 & OOo 3.1.1.
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: .dbf Connection to file not be established. Help!

Post by Villeroy »

I can not reproduce the problem anymore. I created a test.xls with 3 fields (date, float and string), saved a copy in dBase format, loaded both files in Calc and copied rows from one file to the other.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
bigben
Posts: 12
Joined: Mon Jun 02, 2008 11:52 am

Re: .dbf Connection to file not be established. Help!

Post by bigben »

@Villeroy
Ehm... something random case on how to produce this error, got something funny case like this, but sure not complete solved in OOo 2.4.x. In OOo 2.3.0 no matter how you play with it, just no issue no error.
Pls try in much more data like 3 fields you have made, copy hundres of records/rows and paste it into dbf file.
Thx for a lot of doing try and error.
Win Vista Business x32 SP2 & OOo 3.1.1. Win XP Pro SP3 x32 & OOo 3.1.1.
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: .dbf Connection to file not be established. Help!

Post by Villeroy »

Ok, Ok. Let's reproduce the issue with two cells:

Code: Select all

Header
A
Save as dBase, close, reopen:

Code: Select all

HEADER,C,1
A
HEADER,C,1 indicates that field "HEADER" is of type CHAR with length 1.
I change A to AB (length = 2) and when I try to save, I get a descriptive error message about the mismatch of field lenght and values to be stored. It is a different error message than your "Error saving the document Untitled1: Connection to the file could not be established".

However, when I change the header to indicate a larger field lenght everything works fine:

Code: Select all

HEADER,C,2
AB
(the ",C,2" suffix in every header will not be stored. A database program does not show it)

Are you shure about the field types when you copy from one file to the other? You may install my add-on "SpecialCells" from http://www.ooomacros.org/user.php (currently down). It can detect strings and numbers mixed in the same column.
=COUNT($Sheet1.$A$2:$A$65536) counts numbers in column A
Array formula
=MAX(LEN($Sheet1.$A$2:$A$65536)) [Ctrl+Shift+Enter]
returns the maximum length of text in column A
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
bigben
Posts: 12
Joined: Mon Jun 02, 2008 11:52 am

Re: .dbf Connection to file not be established. Help!

Post by bigben »

Villeroy wrote: HEADER,C,1 indicates that field "HEADER" is of type CHAR with length 1.
I change A to AB (length = 2) and when I try to save, I get a descriptive error message about the mismatch of field lenght and values to be stored. It is a different error message than your "Error saving the document Untitled1: Connection to the file could not be established".
Ehm... seem like u can also produce the error msg right? But you can try it on OOo 2.3.0, it will be no error msg whenever how u will change it. Seem strange for me, i tried on other PC with OS Win XP Pro & OOo 2.4.1 just no error msg :? Maybe i can do try and error, or if possible i can attached the .xls & .dbf files for you to tried. I will arrange....
Win Vista Business x32 SP2 & OOo 3.1.1. Win XP Pro SP3 x32 & OOo 3.1.1.
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: .dbf Connection to file not be established. Help!

Post by Villeroy »

No, I can't reproduce the same error message as I could in 2.4.0 (about connection to file). I get a different, more descriptive one when the new data do not comply with the previously set dBase types. I can fix this by adjusting the additional info in the header so the field types get adjusted. However, this may break foreign keys in database programs working with the dBase files. dBase is definitively not a spreadsheet format.
I guess, you are suffering from a Vista problem: http://www.followsteph.com/2007/06/17/w ... read-only/ but who can ever know for shure with such an operating system?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
mauro
Posts: 2
Joined: Sat Jun 21, 2008 5:48 pm

Re: .dbf Connection to file not be established. Help!

Post by mauro »

Yes ...
Help --> About OpenOffice -> 2.4.1 (Spanish package)

O.S: Windows Vista Home Premium.

Thanks,
Mauro
OOo 2.4.X on MS Windows Vista
sclays
Posts: 5
Joined: Thu Nov 06, 2008 11:06 am

Re: .dbf Connection to file not be established. Help!

Post by sclays »

In scalc 3.0 this problem re-appears
OOo 3.0.X on Ms Windows XP
gerardo
Posts: 2
Joined: Thu Jan 15, 2009 12:16 pm

Re: .dbf Connection to file not be established. Help!

Post by gerardo »

I had the same problem, and I think I had solved it.
In OOo options->OpenOffice.org Base->connections you should check connections pool active and check connections pool for this controller for ODBCDriver and JDBCDriver (the first two) at less. After a pc restart OOo calc could save dbf files.

I am using a Spanish version of Ooo (3.x), so I’m not sure that English menu is exactly as I said, but it should be very resembling.

I Hope this solve the problem, cheers
OOo 3.0.X on Ms Windows XP + ubuntu 8.x
gerardo
Posts: 2
Joined: Thu Jan 15, 2009 12:16 pm

Re: .dbf Connection to file not be established. Help!

Post by gerardo »

Sorry, but my tip does not solve the problem. I have had to reinstall OOo 2.3 to properly save my dbf files.
OOo 3.0.X on Ms Windows XP + ubuntu 8.x
sbratcher
Posts: 1
Joined: Wed Feb 18, 2009 6:15 pm

Re: .dbf Connection to file not be established. Help!

Post by sbratcher »

I tried the connection tip but still have the error.

XP
V 3.0.0
OOo 3.0.X on Ms Windows XP
viliam.durina
Posts: 1
Joined: Tue Feb 24, 2009 11:54 am

Re: .dbf Connection to file not be established. Help!

Post by viliam.durina »

Tested with 3.0.1 on Windows XP, tried the tip, problem remains.
Viliam
OOo 3.0.X on Ms Windows XP + Linux
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: .dbf Connection to file not be established. Help!

Post by Villeroy »

Editing dBase files with most of the availlable field types (date/time, char, integer, decimal, boolean, but not binary) works for me without any problem in Calc as well as in Base, in version 3.0.1 as well as in 2.4.2.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
C8X
Posts: 1
Joined: Fri Jul 31, 2009 3:48 pm

Re: .dbf Connection to file not be established. Help!

Post by C8X »

I have been having the same problem, and the solution I found in 3.0.1 was to remove the data type and length off the headers. So when I've opened a dbf that looks like:

Code: Select all

TYPE, C, 12
residential
residential
residential
I can change it to, and I get the 'failure to connect' error message:

Code: Select all

TYPE, C, 12
usa_house_00
usa_house_01
usa_house_02
It only works when I change it to:

Code: Select all

TYPE
usa_house_00
usa_house_01
usa_house_02
It fails to save with that connection issue everyone is reporting, but yet it saves fine when I remove the data type & length code from the header, and let OOo regenerate it itself automatically. It seems to really read the column and select the correct format automatically, and it seems there is a bug in how it tries to save then when it's already present in the working sheet.
OpenOffice 3.1 on Windows XP
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: .dbf Connection to file not be established. Help!

Post by Villeroy »

Works for me. See attached file, which has the wrong extension to let the forum software accept the upload. Remove the ".ods" after downloading.
Attachments
residential.dbf.ods
(104 Bytes) Downloaded 134 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply