Which data format to choose to avoid file lock restriction

3383
11
05-09-2012 07:35 AM
JeremieJoalland1
Occasional Contributor II
I am working on a standalone application (C# VS 2010 arcGIS Engine 10) continuously running on a single computer. (this application should never stop).
part of it is a simple Map Document manager with MapControl+TOCControl : so user should be able to open MXD document, change few things like layer symbology, transparency, map name, and Save the map.
My map document and data files has to be stored this way : 1 folder for each Map Document containing 1 MXD file and all associated data files (vector data).

So each time the user open a map document (IMapDocument.Open), lock files are created, and as the application never stop, these lock files are not (never) removed, even if the user close the map and open another one. (or maybe I do something wrong there in my code).

My issue is that the user should be able to Delete a Map according this process : delete the folder containing the map document and all content : the mxd file and all data files (like shapefile). But once the map document has been opened, there are always lock files there and full delete of my folder is not possible.

Shapefile, file geodatabase and personal geodatabase generate LOCK files, so what kind of data format could I use ?

the important point is that my application does not allow data editing, I am only developing functionnalities for map configuration (symbols, zoom scale) and drawing temporary geometry in graphic layers... so I really don't need these LOCK files. I just need to use my vector data as basemap !
So I guess, I definitly need a read-only data format...

I've tried base map layer which is not working because it's a group layer still loading data such as shapefile of feature class
I've tried SDC data which is working fine, but i don't think I can generate my own SDC files with ArcGIS Desktop (is it possible ?)

any solution ?
0 Kudos
11 Replies
AlexanderGray
Occasional Contributor III
For file gdb, I user IDataset.delete on the workspace level to delete the gdb rather than .net delete functions.
0 Kudos
JeremieJoalland1
Occasional Contributor II
I will try to see if I reproduce the exception with the Disconnect method today based on your details and code.  Which service pack do you have for ArcGIS Engine Runtime 10.0?  SP4?


I have ArcGIS Engine Runtime 10.0 with SP 0 ->  ArcGIS Service Pack : 0 (version 0)
(product version : 10.0.0.2414)

How can I install SP4 ?
Does I need to execute install of SP4 as "administrator" ?
Does I need to install SP1, 2 or 3 before ?
0 Kudos