Adam Turoff on Wed, 8 Aug 2001 13:22:34 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: can you create an access mdb file with DBD::ODBC?


On Wed, Aug 08, 2001 at 12:19:31PM -0400, Robert Spier wrote:
> Another way to do it would be with OLE/COM/ActiveX (pick your favorite term) to
> instantiate an Access object and give it the CreateNewDatabase command.  That
> would be pretty simple too.  

That's what I'd try, actually.  I seem to remember that ODBC connections
can't create a new database, since they need to point to a specific
database instance (but I'm probably wrong about that).

Access probably supports some SQL extension to select into a new table
in a new file (creating the file if it doesn't exist, blowing away the
table if the table previously existed).  That might be a completely 
DBI-centric trick, and might work for your needs.

The other technique, as Robert alludes to, would be to use Win32::OLE
to do all of the db creation work, and possibly create a new ODBC
instance for that new database.  Good luck finding the documentation
for that though; it's going to be hiding somewhere on msdn.microsoft.com.

Lots of ways to do it.  :-)

Z.

**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**