Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Create a MS Access database programmatically in perl

by jsprat (Curate)
on Jul 07, 2003 at 18:20 UTC ( #272059=note: print w/replies, xml ) Need Help??

in reply to Create a MS Access database programmatically in perl

First of all, create an account! If you post regularly, you'll find all kinds of benefits. Most of all, it's fun.

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...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://272059]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2017-02-28 00:30 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (393 votes). Check out past polls.