Import DBF, no Copy/Paste or "connect" method

Discuss the database features

Import DBF, no Copy/Paste or "connect" method

Postby kotowan » Mon Jan 14, 2008 5:43 pm

I would like to import DBF without Copy/Paste or connection method.
I have DBF file, which I can successfully connect to BASE.Unfortunately, some functionality will be missing in this case i.e impossible to do calculations in queries.(ROUND() does not help).Another way to import it is to open DBF file with Calc and do Copy/Paste then. Because my DBF file is large this method is unacceptable slow, and I have to do this every day.
So none of the two methods actually solve my problem.
I would appreciate if anybody could give me any suggestions on how to overcome above mentioned problems?
kotowan
 
Posts: 5
Joined: Mon Jan 14, 2008 4:27 pm

Re: Import DBF, no Copy/Paste or "connect" method

Postby DrewJensen » Mon Jan 14, 2008 7:01 pm

If the dbf file is the same every day then you will need to write an import script.

If the data in the daily dbf is new each day and you want to use the native Base database to act as a collector this is really straight forward. Is it?
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
User avatar
DrewJensen
Volunteer
 
Posts: 1734
Joined: Sat Oct 06, 2007 9:01 pm
Location: Cumberland, MD - USA

Re: Import DBF, no Copy/Paste or "connect" method

Postby kotowan » Tue Jan 15, 2008 12:05 am

Thank you for answering. *DBF database is the same but the data changes daily. I want to import it to Base every day and do some manipulations with the data.
I could have used Base as a collector but it will take a lot of work to migrate, this is something that can not be done right now.
kotowan
 
Posts: 5
Joined: Mon Jan 14, 2008 4:27 pm

Re: Import DBF, no Copy/Paste or "connect" method

Postby DrewJensen » Tue Jan 15, 2008 1:27 am

OK - I wasn't clear - I meant simply to use Base as an aggregate of all the different daily dbf files, versus just a copy of the single file..

I think I have your intention now.
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
User avatar
DrewJensen
Volunteer
 
Posts: 1734
Joined: Sat Oct 06, 2007 9:01 pm
Location: Cumberland, MD - USA

Re: Import DBF, no Copy/Paste or "connect" method

Postby Villeroy » Tue Jan 15, 2008 7:26 am

You may consider to load dbf as a spreadsheet. Mind the data types which are indicated in the header row after import (Date[DATE]) and the row/col limit of 65536x256.
Then you may import queries and tables from a registered Base document into a spreadsheet (similar like a report, but outside the database). Import as plain tables or data pilots (aka cross tables, aka pivot tables). Both are refreshable. Data pilots include aggregation functions (Sum, Count, Min, Max, Avg,...). You can attach spreadsheet formulas as field functions next to the import range. Their size will adjust on refresh.
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: 27114
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Import DBF, no Copy/Paste or "connect" method

Postby kotowan » Tue Jan 15, 2008 11:41 pm

Thank you for suggestion. It seems that as I suspected there is no easy way to convert DBF to HSQL. Sigh
kotowan
 
Posts: 5
Joined: Mon Jan 14, 2008 4:27 pm

Re: Import DBF, no Copy/Paste or "connect" method

Postby Villeroy » Tue Jan 15, 2008 11:51 pm

Conversion is possible through the clipboard and the import-wizzard. Drag a table from your dBase-Base into the tables container of a hsql-Base. A wizzard pops up ...
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: 27114
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Import DBF, no Copy/Paste or "connect" method

Postby kotowan » Wed Jan 16, 2008 6:16 am

Essentially, what you are suggesting is Copy/Paste method. (I guess when you drag and drop this is essentially what happens) I have already tried. Very ,very, very slow....(can not work like that) The databse size is moderate 7000 records and half a dozen field.
So now the problem seems to be the speed not the ability.
kotowan
 
Posts: 5
Joined: Mon Jan 14, 2008 4:27 pm

Re: Import DBF, no Copy/Paste or "connect" method

Postby DrewJensen » Wed Jan 16, 2008 6:45 am

Right - and sorry I haven't gotten back yet. The speed issue is, IMO, related to two issues. First the transfer through the clipboard and secondly the fact that the copy table wizard uses single transaction updates. That is why I say you want a script to do the transfer. You can bypass the clipboard and you can use an isolated connection allowing an efficient batch update mode.

In the macros forum I posted topic called Copy Record that would show you the basics of the actual copy funciton - but it doesn't use an isolated connection ( was intended to be used from a form ) or the batch update - that's the part that needs to be wrapped around it. Even then I'm not sure how fast Basic is going to be, one would really want to do this in python or Java maybe.

Tell you what - can you give me a table layout on that dbf file - fields and data types so that I could put something close together as an example and populate with some dummy data that would make sense for a speed test?
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
User avatar
DrewJensen
Volunteer
 
Posts: 1734
Joined: Sat Oct 06, 2007 9:01 pm
Location: Cumberland, MD - USA

Re: Import DBF, no Copy/Paste or "connect" method

Postby kotowan » Sat Jan 19, 2008 8:39 am

Thank you for an update. I took another route, I imported dbf into MySQL and connected to it using ODBC driver. It works but I still have difficulties with this approch.
kotowan
 
Posts: 5
Joined: Mon Jan 14, 2008 4:27 pm


Return to Base

Who is online

Users browsing this forum: No registered users and 4 guests