Trying to create a Access 2007 (*.accdb) with TUniConnection
Posted: Mon 10 Jul 2017 22:08
With TUniConnection, I am able to create a 2002-2003 *.mdb file on the fly. I just do the following and it works. The file is created and I can go forward.
Now in order to get the newer Access 2007+ (*.accdb) format to work, I have tried the following code, but first I had to make sure the Microsoft Access Database Engine 2010 Redistributable is installed (https://www.microsoft.com/en-us/downloa ... x?id=13255).
However, when the above code runs, it still creates a 2002-2003 Access DB format.
I have verified that TUniConnection can open the 2007 Access DB format for which I created the file with Access 2016. It just looks like it can't create it with Delphi.
Is there something else that I can do to get this to create a newer Access DB format.
Code: Select all
UniConnection.ProviderName := 'Access';
UniConnection.Database := 'c:\temp\database.mdb';
UniConnection.SpecificOptions.Values['ForceCreateDatabase'] := 'True';
UniConnection.SpecificOptions.Values['DriverVersion'] := 'dvAuto';
UniConnection.Connect;
Code: Select all
UniConnection.ProviderName := 'Access';
UniConnection.Database := 'c:\temp\database.accdb';
UniConnection.SpecificOptions.Values['ForceCreateDatabase'] := 'True';
UniConnection.SpecificOptions.Values['DriverVersion'] := 'dvAccdb';
UniConnection.Connect;I have verified that TUniConnection can open the 2007 Access DB format for which I created the file with Access 2016. It just looks like it can't create it with Delphi.
Is there something else that I can do to get this to create a newer Access DB format.