Creating an Access 2002 - 2003 Database using VB6 and ADOX

From: Chris Davison (ChrisDavison_at_discussions.microsoft.com)
Date: 01/29/05


Date: Fri, 28 Jan 2005 17:25:01 -0800

I'm able to create all versions of Access databases up through Access 2000
using the ADOX.Catalog Create method; however, I've been unsuccessful in
finding the correct Connection syntax to create an Access database in the
2002-2003 format.

For example, the following code will create a new Access 2000 database;

Set oCatalog = New ADOX.Catalog
oCatalog.Create "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine
Type=5;Data Source=" & sDBFile & ";"

Several Microsoft web pages indicate that I should be able to create Access
2002-2003 database, but I haven't seen any examples of how to do it. The
following page dicusses it:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaac11/html/acmscUsingADOInAccess2000_HV05285627.asp

Opening and appending to Access 2002-2003 databases works fine - I just need
to know how to create new databases.

Any suggestions?

Thanks,

Chris Davison
Gravic, Inc.
Microsoft Certified Partner