A few years ago I was able to use PInvoke to create Microsoft Access databases without access installed via the API call SQLConfigDataSource(). The code is here.
I’ve ported that PInvoke call to work on Windows 7 and powershell 2.0.
I know that ODBCJT32.DLL supports at least the following:
- COMPACT_DB
- CREATE_DBV2
- CREATE_DBV3
- CREATE_DBV4
- CREATE_DB
- REPAIR_DB
And I know that ACEODBC.DLL suppports at least CREATE_DB and will experiment with the others. However, I’ve never actually found a MSDN document with an authoritative list of what attribute pairs are supported. Does one exist?
The calls for ODBCJT32.DLL are documented in the MSDN page entitled SQLConfigDataSource (Access Driver). However, it is incomplete. It incorrectly calls CREATE_DBV2 CREATE_V2DB and does not list CREATE_DBV3 or CREATE_DBV4. This is all pointed out in KB126606.