Reading Data from a FoxPro.dbf file

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
guitarpeggio
Posts: 2
Joined: Thu Aug 12, 2010 4:02 am

Reading Data from a FoxPro.dbf file

Post by guitarpeggio » Thu Aug 12, 2010 4:05 am

Could anyone give a basic rundown of what needs to happen to be able to read and update data from a foxpro dbf file? I know this is a pretty non-specific question, but I'm just looking for a place to start. I'm not having any luck as of yet.

Thanks!

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Reading Data from a FoxPro.dbf file

Post by Mark » Thu Aug 12, 2010 7:55 am

Hello guitarpeggio,

First, use FoxPro to export your data to a tab-delimited text file. Now write a RunRev script to read the file or use the SQlite command line utility to import your data into an SQLite database. What exactly do you want to do with the data and where do you get stuck?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

guitarpeggio
Posts: 2
Joined: Thu Aug 12, 2010 4:02 am

Re: Reading Data from a FoxPro.dbf file

Post by guitarpeggio » Thu Aug 12, 2010 9:57 am

Thanks Mark,
I was hoping to create an app that will allow me to read and modify data from a table in the dbf without converting it. It's looking like I'll have to convert the files first, much like you suggested or get my hands on a copy of Visual Fox Pro to create the app. I'm completely new to all of this.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Reading Data from a FoxPro.dbf file

Post by FourthWorld » Thu Aug 12, 2010 1:16 pm

You could write a parser for it:
http://www.dbf2002.com/dbf-file-format.html

But that seems like a lot of work. Unless it's something you'd need to do frequently you may be better off with a simple export.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply