Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Which xBase module?

by roboticus (Canon)
on Mar 26, 2012 at 22:50 UTC ( #961773=note: print w/ replies, xml ) Need Help??


in reply to Which xBase module?

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.


Comment on Re: Which xBase module?
Re^2: Which xBase module?
by parser (Novice) on Mar 27, 2012 at 04:22 UTC

    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'd second Jenda's response. DBI is has some magic that will get you what you need, most of the time. My only comment would be that calling $table->header_info() method will give you some details of the table structure of the database file.
        Well, that's my $.02 worth. No, for refunds you'll have to check our customer service department.

        Thanks Jenda.

        I have been using the base module and not the DBI version but I am already using the DBI module for MySQL in the same code base so that may make more sense.

        Cheers

Re^2: Which xBase module?
by petdance (Parson) on Mar 27, 2012 at 22:25 UTC
    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: note [id://961773]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2014-09-22 06:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (182 votes), past polls