Select to view content in your preferred language

Problems with locking tables

4412
10
05-02-2013 12:18 AM
teamIgal
Deactivated User
Hello,

I am using file geodatabase api 1.3.
I am not sure what is the proper way to use SetWriteLock() on tables in the GDB.

we are using one instance of the table in the code, and on that instance we read and write data on different places.

before i preform an insert or update on the table i set "SetWriteLock() " and after that "FreeWriteLock()", and still i get exception of "Cannot aquire a lock" when i reach to this line.

Why is that happening?

Thanks,
Igal team
0 Kudos
10 Replies
LanceShipman
Esri Regular Contributor
Try setting the write lock after running the search. 

rowsParcels = parcelTable.Search(firstColumn, parcelTableWhereClause, RowInstance.Recycle);

parcelTable.SetWriteLock();
0 Kudos