Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Which xBase module?

by parser (Novice)
on Mar 26, 2012 at 21:35 UTC ( #961760=perlquestion: print w/ replies, xml ) Need Help??
parser has asked for the wisdom of the Perl Monks concerning the following question:

Hello fellow Monks,

After a few hours of reading on CPAN and few few (mis)trials with various modules I am reduced to making inquiry - which is the superior module for reading DBF files?

I have come into posession of a few very large DBF files and I need to accurately read and munge the contents. I have no need to read indices nor to write to DBF files. The ability to query for field name and type is valuable as is at least rudimentary error handling.

Cheers

Comment on Which xBase module?
Re: Which xBase module?
by roboticus (Canon) on Mar 26, 2012 at 22:50 UTC

    parser:

    I've not used any xBase packages, but if I were going to, I'd probably try DBD::Xbase first because I use the DBI package for all other database work.

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

      I installed DBD::XBase and gave it a try. It works much better than the previous two modules. Especially for correct interpretation of field types.

      I am still scratching my head around how to get a list of field types but I'll read the module source and see what is being passed back.

      Cheers

        See the docs of DBI instead, the table_info() and column_info() methods. I think that's what you are looking for.

        Jenda
        Enoch was right!
        Enjoy the last years of Rome.

      I endorse DBD::Xbase. I've had it in production until a year ago when we finally abandoned the legacy FoxPro database we still had to read from.

      DBD::Xbase also comes with a handy little program, dbfdump.

      xoxo,
      Andy

        I found the nugget that is dbfdump in the XBase.pm module. It is called get_header_info and is perfect for what I am doing.

        Thanks to all for the great thoughts and advice!

        Cheers

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://961760]
Approved by planetscape
Front-paged by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2014-08-02 01:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (53 votes), past polls