LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-05-2016, 03:47 AM   #1
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,622
Blog Entries: 40

Rep: Reputation: Disabled
sqlite to dbf conversion


Good morning.

Short question: How would you convert sqlite databases/files to dbf-format?

Long explication: I can export sqlite to csv and convert csv to DBase-format and maybe I will just do that in the little “project” that I ponder.

My favorite Office-suite (see there) allows, like all the others, to connect a document to a database. For historical reasons, the only database-format supported is still DBase.

They used to include in their Windows versions a database tool which was IMHO a clone of the old StarBase-program from StarDivision (later Sun and StarOffice, then ...).

Now that the office-suite for Linux becomes more and more popular, the lack of a decent and integrated GUI for the definition and management of databases is often lamented. Apart from the fact, that I have personally no use for such a tool and even less for its integration (what's that anyway) into the office-suite, I wonder, if I could not help “to integrate” SQLite and existing front-ends by providing a simple conversion-tool.

This way, any existing and modern utilities which work with SQLite could be used to provide DBase-files for use with the office-suite. The latter permits already the execution of external commands with the help of user-defined tool-buttons.

It is possible that a shell-script suffices. Or I write a Ruby-script. But maybe none of this is necessary. My search for existing conversion tools was futile so far. You can even provide me with the link to a successful search if you know better criteria than mine.
 
Old 11-05-2016, 04:10 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
Looking at the documentation, there doesn't seem to be a need to convert the csv file any further as it can be directly imported. I think the main issue I can see is that you need to
have the tables created prior to the import with the correct fields so the import will work. So I see it being a 2 step process where first you need to export the table details to first create
any required tables and then perform the export into csv format.

On the other hand, ruby does have both an sqlite and dbf gems, so you may be able to simply open and read through one and import into the other on the fly
 
Old 11-05-2016, 05:38 AM   #3
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,622

Original Poster
Blog Entries: 40

Rep: Reputation: Disabled
Quote:
Originally Posted by grail View Post
On the other hand, ruby does have both an sqlite and dbf gems, so you may be able to simply open and read through one and import into the other on the fly
Thank you.

I ignored the existence of the sqlite gem. The dbf gem is already part of a dbf2vcf script that I have written (rather dbf2text with user-provided mappings). So, if there is no existing “tool” for the conversion, I feel like writing one.
 
  


Reply

Tags
converter, dbase, office, sqlite



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot open .dbf file hd_pulse Programming 3 06-13-2011 12:07 PM
LXer: Sqlite-Commander - A ncurses based tool to display the records and tables of a sqlite database LXer Syndicated Linux News 0 01-02-2011 08:11 AM
Query on dbf file. just.srad General 1 07-06-2010 11:54 PM
DBF and Java MRMadhav Programming 1 02-18-2006 10:26 AM
I Need Database file (*.dbf) surya123 Programming 2 08-21-2003 02:39 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration