ArcObjects C# Randomly fails to open workspace

Discussion created by mvillemontesrifrance-fr-esridist Employee on Nov 12, 2013
Latest reply on Nov 12, 2013 by Neil

My program randomly fails to open a workspace: System.Runtime.InteropServices.COMException (0x80040213): Exception de HRESULT : 0x80040213

IWorkspaceFactory workspaceFactory = new AccessWorkspaceFactoryClass();
pFWksSource = (IFeatureWorkspace)workspaceFactory.Open(propertySet, 0);

I have tried a workaround (as suggested in another post) by retrying when it fails with error code -2147220973. It seemed to work for a while but I still sometime exceed the number of retry (3).

Any suggestions on how to fix that ?