On 2/20/08, Zak B. Elep <[EMAIL PROTECTED]> wrote:
> On 2/20/08, jan gestre <[EMAIL PROTECTED]> wrote:
> >
> > Hi Guys,
> >
> > Do you know any opensource application that can convert Foxpro (.dbf) to
> > MySQL? I already tried Google but most are shareware and the trial versions
> > are no good anyways.
>
> Hmm you could probably write a perl script making use of XBase[0] to
> read the Foxpro database, then maybe use SQL::Translator[1] (thru the
> `sqlt' command and DBD::XBase DBD wrapper) to make the SQL.  Using
> these couple should be possible to make a Foxpro to MySQL database
> dumper; see SQL::Translator::Manual on how to do this.[2]
>
> [0]  http://search.cpan.org/perldoc?XBase
> [1]  http://search.cpan.org/perldoc?SQL::Translator
> [2]  http://search.cpan.org/perldoc?SQL::Translator::Manual

Reading [2], you can even do without writing the script yourself, and
just let sqlt write it for you, like this:

$ sqlt -f DBI -t Dumper --dsn dbi:XBase:/path/to/db.dbf --dumper-dsn
dbi:MySQL:FOO --dumper-db-user guest --dumper-db-password p4ssw0rd >
foo-dumper.pl
$ ./foo-dumper.pl > foo-data.mysql

Cheers,

Zakame


-- 
Zak B. Elep  ||  http://zakame.spunge.org
[EMAIL PROTECTED]  ||  [EMAIL PROTECTED]  ||  [EMAIL PROTECTED]
1486 7957 454D E529 E4F1  F75E 5787 B1FD FA53 851D
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to