I am trying to work on making bulk inserts and deletes but I am having trouble releasing the write lock on the table. I made a small sample project with only one insert to test the lock and the lock remains even after the table calls FreeWriteLock. The lock is only removed when the Geodatabase object is closed or disposed of. I want the lock to be removed when table calls FreeWriteLock.
Using File Geodatabase API 1.4
Here is a sample of my code:
public void InsertRow()
using (Geodatabase geodatabase = Geodatabase.Open(DestinationDBPath))
using (Table table = geodatabase.OpenTable("Points"))
using (Row row = table.CreateRowObject())
table.FreeWriteLock(); //Lock still remains after this call...why??
Solved! Go to Solution.
Thank you for the response. I have a few follow up questions.
The performance impact of closing and disposing of the geodatabase is limited. The 1.3 version of the software has the same issue. We are currently investigating the problem and will post the results of our investigation.