1
votes

Our application needs to create an .mdb (MS Access 2000) file from VB.NET. We use ADOX for this using as connection string

Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type=5;

This works well. However, now we want to allow 64-bit compilation of our application. As the Jet 4.0 engine is 32-bit only, the Provider in the connection string must be changed to ACE 12.0. When we use this provider however, an MS Access 2010 (.accdb) file is created while we need an MS Access 2000 (.mdb) file.

How can we solve this?

2
Are you sure it's worth doing this? - bear in mind that if there are any issues here, access 2000 fell out of even extended support 7 years ago. Sometimes there has to be a point to say "enough is enough".Damien_The_Unbeliever
I think @Damien_The_Unbeliever has a good point... Something that dated will be forever be less and less supported. Switch to a later access database (or, even better SQLite or SQL Server)Basic

2 Answers

1
votes

You could use ACE DAO instead of ADOX, like so:

' required COM reference:
'     Microsoft Office 14.0 Access Database Engine Object Library
' 
' Imports Microsoft.Office.Interop.Access.Dao
'
Dim dbe As New DBEngine
dbe.CreateDatabase("C:\path\foo.mdb", LanguageConstants.dbLangGeneral, DatabaseTypeEnum.dbVersion40)
1
votes

Well, we tried our luck with

Provider=Microsoft.ACE.OLEDB.12.0;Jet OLEDB:Engine Type=5;

And lo and behold: it seems to work!