Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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...

In reply to Re: Create a MS Access database programmatically in perl by jsprat
in thread Create a MS Access database programmatically in perl by Anonymous Monk

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others chilling in the Monastery: (6)
    As of 2017-11-23 00:03 GMT
    Find Nodes?
      Voting Booth?
      In order to be able to say "I know Perl", you must have:

      Results (327 votes). Check out past polls.