Page 1 of 1

.dbf Connection to file not be established. Help!

Posted: Sat Jun 21, 2008 5:58 pm
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

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

Posted: Sat Jun 21, 2008 8:42 pm
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".

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

Posted: Wed Jun 25, 2008 8:53 am
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.

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

Posted: Wed Jun 25, 2008 2:29 pm
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.

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

Posted: Thu Jun 26, 2008 4:32 am
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.

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

Posted: Thu Jun 26, 2008 8:57 pm
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

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

Posted: Mon Jun 30, 2008 12:05 pm
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....

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

Posted: Mon Jun 30, 2008 12:17 pm
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?

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

Posted: Tue Jul 01, 2008 5:52 pm
by mauro
Yes ...
Help --> About OpenOffice -> 2.4.1 (Spanish package)

O.S: Windows Vista Home Premium.

Thanks,
Mauro

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

Posted: Mon Nov 17, 2008 5:54 pm
by sclays
In scalc 3.0 this problem re-appears

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

Posted: Thu Jan 15, 2009 12:34 pm
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

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

Posted: Thu Jan 29, 2009 8:38 pm
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.

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

Posted: Wed Feb 18, 2009 6:19 pm
by sbratcher
I tried the connection tip but still have the error.

XP
V 3.0.0

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

Posted: Tue Feb 24, 2009 11:57 am
by viliam.durina
Tested with 3.0.1 on Windows XP, tried the tip, problem remains.
Viliam

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

Posted: Tue Feb 24, 2009 12:18 pm
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.

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

Posted: Fri Jul 31, 2009 4:23 pm
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.

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

Posted: Fri Jul 31, 2009 6:01 pm
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.