Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
If you can export to Excel, you should be able to read it in with Spreadsheet::ParseExcel (if its saved as the correct version, apparently)

Update: I wrote a little dumper for you - hopefully this will help a little. I don't have aparently do have access, so I tested it with it and MySQL, but I think it turns out that DBI's methods are the same for both. All this does is dump all the tables of a database in files of the tables' names, delimited by tabs, but you can easily change that to whatever you want (I just like tabs :-)...
use DBI; my $dbh = DBI->connect("dbi:ODBC:db_test","Admin","password-here", {Ra +iseError => 1, PrintError => 1, AutoCommit => 1} ); my $sel = $dbh->prepare("SELECT [Name] FROM MSysObjects WHERE [Type] = + 1 and [Name] not like 'MSys%'"); $sel->execute; my @tables; while (my ($tab) = $sel->fetchrow_array) { push(@tables, $tab) } $sel->finish; for (@tables) { my $sel = $dbh->prepare("SELECT * FROM $_;"); $sel->execute(); open(DBF,">$_"); print DBF join("\t", @{$sel->{NAME}}), "\n"; while(my (@r) = $sel->fetchrow_array) { for (0..$#r) { $r[$_] =~ s/[\n\r\t]/\?/sg } print DBF join("\t", @r), "\n"; } close(DBF); $sel->finish; }

Really hope this helps,
  -Adam

Update2: The following help is pulled from here:
    After you have installed it, start up a DOS prompt, and type commands as shown below (as lexxwern suggested). PPM is a tool that comes with ActiveState Perl you can use to install Perl modules. Press enter after each command (after installing ActiveState Perl you should have path to ppm.bat).

    ppm
    install DBI
    install DBD::ODBC
    exit

    Then enter control panel, doubleclick on ODBC, click on "System DSN" property sheet, then click button "Add". Select "Microsoft Access Driver (*.mdb), and click "Finish". Type "test" (in this case "db_test") as data source name, click button "Select" and select the Access .mdb file you want to use. The .mdb file should be located below the root of the web server.


Update 3: I could seriously pull my hair out - OK! The code above now works with Microsucks Access - it appears that Access's version of SQL has been totally butchered. Also - make sure you set your permissions correctly within Access so you can access the MSysObjects hidden table... ARGH- MS... err, Access... {rage boils}

Search keywods: show tables in Microsoft Access using SQL - Microsoft Access user permissions

--
By a scallop's forelocks!


In reply to Re: exporting MS ACCESS tables into a CSV file by Adrade
in thread exporting MS ACCESS tables into a CSV file by chicago928

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 13:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found