Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Convert MDB File To Txt File

by Anonymous Monk
on Apr 28, 2005 at 04:56 UTC ( #452217=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

I need to convert .mdb file to .txt file.. Is there any module or any coding to do this???

Thank you,

Comment on Convert MDB File To Txt File
Re: Convert MDB File To Txt File
by jZed (Prior) on Apr 28, 2005 at 04:59 UTC
    Well, I think Access can export to CSV so that's the easiest. If you don't have access to Access, you use DBI with DBD::ODBC to read the .mdb and DBD::CSV to write out the .txt file.

      Let me know how do you convert without "Access"..

      Thanks

        You should take a look at MDB Tools.

        Not entirely without problems, it's reliable enough that I use it in an ongoing project that I have to keep an eye on anyway. You can backtick to the command line utilities or use a GUI thingy. Looks like something that would benefit from having a Perl module in front of it...


        MB
        update

        I just discovered this one: Openoffice.org, which is available on both windows and *nix, apparently has an experimental .mdb reader and it can write in many formats.

        Did you read the second sentence of my reply? It specifies what to do if you don't have Access. Did you follow the links in that second sentence? They go to the documentation for the modules that will help you do what you want. Did you read that documentation and get stuck? If so, tell us what part you're stuck on and we'll be glad to help. You also need to tell us what OS you are using since the specifics of the answer differ depending on whether you are on windows or not.

      Can you give Some Sample Coding.. It Would be very better to develop further.. Thanks You!!

        What have you tried so far?
        I don't think anyone is going to write your code without any effort from you

        "We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.
Re: Convert MDB File To Txt File
by gube (Parson) on Apr 28, 2005 at 05:19 UTC

    You can use DBI module and also using DBD::ADO or DBD::ODBC you just pass the query and read the text and you write it to the text file is better.

    To know detail about connect database go to the link How to link Ms-access data's in perl

Re: Convert MDB File To Txt File
by inman (Curate) on Apr 28, 2005 at 09:06 UTC
    There follows some old code that I had knocking around on my machine from a proof of concept.

    This code was from a risk management project where there was a concern that the content of Access databases could not be analysed by the risk management search tool. The idea was to locate and dump any MDB to an XML file which could then be indexed without having to know anything about the database schema.

    The code is probably well dodgy...

Log In?
Username:
Password:

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

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

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (106 votes), past polls