in reply to exporting MS ACCESS tables into a CSV file
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. Idon'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 :-)...
Really hope this helps,
-Adam
Update2: The following help is pulled from here:
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
Update: I wrote a little dumper for you - hopefully this will help a little. I
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 Section
Seekers of Perl Wisdom