I have been reading thru a lot of different options for compacting and repairing an access database, but most require the user to have Access installed. Is there any code avaialble that would allow this to occur, without the user having access installed?
I have "Microsoft.ACE.OLEDB.12.0" being used as part of my connection string to the database.
Thanks for any assistance.
RICHARD KNOXPosted Apr 26, 2024, 2:08 AM
I tried your code, but I got this as an error.
Jayraj ChhayaPosted Apr 25, 2024, 5:59 AM
To compact and repair an Access database without the need for Access to be installed, you can achieve this programmatically using C# in a .NET environment. You can utilize the
Jet.OLEDB.4.0provider to compact and repair the database. Here is a sample code snippet to accomplish this:By using the
COMPACT DATABASEcommand with theJet.OLEDB.4.0provider, you can compact and repair the Access database programmatically without the need for Access to be installed on the user's machine.