Re: Getting all names in mdb
- From: gcd00051@xxxxxxxxxxx
- Date: Fri, 7 Dec 2007 17:51:25 +0900 (JST)
Hi. Long time to see you :-).
----- Original Message -----
Subject: Getting all names in mdbIf you want to use ODBC, you can get them from "MSysObjects" table.
Date: Fri, 7 Dec 2007 11:19:05 +0900
From: 田口 浩 <h-taguchi@xxxxxxxxxxx>
To: <dbi-users@xxxxxxxx>
Hello,
I'm using .mdb file with DBI/DBD::ODBC.
my $dbh = DBI->connect("dbi:ODBC:test", "", "",
{RaiseError => 1, AutoCommit => 0, LongReadLen => 409600})
or die "$DBI::errstr";
Anyone will teach me how to get all names of tables
(in test.mdb)?
But probably you should set reading previledges for that mdb files.
cf. Sorry these are in Japanese
http://www.accessclub.jp/bbs6/0003/das426.html
http://homepage1.nifty.com/kojama/works/rdbms/jet/dbinfo.html#term04
http://www.nihon-eng.co.jp/c-break/technote/tomcat/TCAT41_DB.htm
# I've set them with Security Wizard
ex.
use strict;
use DBI;
my $sDsn = 'driver=Microsoft Access Driver (*.mdb);dbq=c:\test.mdb;'.
'SystemDB=c:\security.mdw';
my $hDb = DBI->connect('dbi:ODBC:'. $sDsn, 'dbdtest', 'dbdtest',
{RaiseError=>1, AutoCommit=> 1});
my $hSt = $hDb->prepare(
q{SELECT name FROM MSysObjects WHERE type=1 AND name NOT LIKE 'MSys%'}
);
$hSt->execute();
while(my $raD = $hSt->fetchrow_arrayref())
{
print join("\t", @$raD) . "\n";
}
$hSt->finish();
$hDb->disconnect();
.
- References:
- Getting all names in mdb
- From: h-taguchi
- Getting all names in mdb
- Prev by Date: Re: Getting all names in mdb
- Next by Date: Connecting to Database
- Previous by thread: Re: Getting all names in mdb
- Next by thread: RE: Getting all names in mdb
- Index(es):