Re: Getting all names in mdb



On Fri, 2007-12-07 at 11:19 +0900, 田口 浩 wrote:

Hi

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)?

$sth = $dbh -> table_info(undef, undef, '%', 'TABLE');

while ($data = $sth -> fetchrow_hashref() )
{
$table_name = $$data{'TABLE_NAME'};
....
}

or

install DBIx::Admin::TableInfo.

--
Ron Savage
ron@xxxxxxxxxxxxx
http://savage.net.au/index.html


.


Quantcast