in reply to Create a MS Access database programmatically in perl
As for your question, you aren't importing the constants from the ADOX library - ADO doesn't know what you mean by 'adVarWChar'. Use the object browser (ships with ActiveState, usually installed at \Perl\html\OLE-Browser\Browser.html) to find out which version of ADOX is installed, and add it to the use Win32::OLE::Const line. It should look something like this:
use Win32::OLE::Const 'Microsoft ADO Ext. 2.5 for DDL and Security';
Also, check the Win32::OLE docs for Win32::OLE->LastError() and the warn option (specifically Win32::OLE->Option(warn => 2); #or 3 or 4). This should help your debugging.
By the way, once the database is created, it would probably be much more straightforward to use the DBI to create your tables. Good luck...
|
---|