IDataLayer Connect and Disconnect - Shapefile/GDB Locks

04-07-2014 12:45 PM
Occasional Contributor III
Hey all,

We have an Add-In to "clip project area" essentially. Bunch of layers sourcing to multiple base data locations on our server, and this program basically says: select all features within extent, export, re-source layers to the exported location (the project folder).

My question has to do with the pre-existing lock files to the original datasets. Even after the data has been re-sourced the lock remains. I understand lock files remain for some additional functionality (e.g. remove layer and then allowing the user to 'undo') but figured I'd double check with you guys first.

So, is there any way at all, short of closing the MXD, to programatically remove these locks?

My thoughts were to try and implement IDataLayer.Disconnect, before re-sourcing the data, but that didn't work as intended.

Any info would be appreciated.
0 Kudos
0 Replies