in reply to Create a MS Access database programmatically in perl

MSDN

under the provider support for ADOX section of this document you will see that append and delete methods are not supported for ODBC.

however, the DAO.TableDefs.Append method in DAO 3.5.1 or greater, will accomplish that task. I haven't tested it .. but its listed in access as a supported method.
UNTESTED
use Win32::OLE my $app = Win32::OLE->new(Access.Application); my $table = Win32::OLE->new(DAO.TableDef); $app->OpenCurrentDatabase(xxx.mdb); #Returns the DAO database object $database = $app->CurrentDb(); $table->CreateField(myField,Text,255); $database->TableDefs->Append($table);
Hope this helps.

Replies are listed 'Best First'.
Re: Re: Create a MS Access database programmatically in perl
by jsprat (Curate) on Jul 07, 2003 at 23:01 UTC
    under the provider support for ADOX section of this document you will see that append and delete methods are not supported for ODBC.

    But the OP is not using ODBC, he's using the JET provider for ADO. Look here for the working (Method 2 - tested!) example he's building from.