Brad Smith wrote:
You need to create an Access Application object via OLE, open the database, do your stuff and close. Here's the basics (no error checking):
I am assuming that I have to open the database first, then rename the table. Is that much correct?
use Win32::OLE;
my $file='d:\test.mdb';
my $access = Win32::OLE->new('Access.Application');
$access->OpenCurrentDatabase($file);
$access->DoCmd->Rename("NewTableName", 0, "OldTableName");
$access->Quit();
Using this OLE approach (as apposed to copy exisiting table approach) all table properties, indexes, relationships, etc are maintained.
--
Simon Oliver