Skip to main content

Hello : )

 

I have a Form workbench that first deletes some records from two tables in a geodatabase and then inserts new records into these tables in the geodatabase. This worked fine in FME 2021 but after upgrading to FME 2024 the delete creates a lock on the geodatabase and causes the process to fail:

 

An error occurred while attempting to open an insert cursor on the table 'Total'. The error number from ArcObjects is: '-2147220947'. The error message from ArcObjects is: {Cannot acquire a lock.}

 

Any advice on how to fix this problem would be great.


 

Hi there, are you using the FILEGDB (open API file geodatabase) or the FILE_GEODATABASE (esri licensed file geodatabase) on the writer. You should be able to choose/switch either if the geometry is simple point, line or polygon outputs.

 

The order of the table operations matter when writing to GDB. Are the features with the DELETE (fme_db_operation) arriving first to the writer, followed by the feature with INSERT (fme_db_operation). Please include your fmw (or as an fmwt template if possible) or screen shot.


Many thanks for responding.

It’s a FILE_GEODATABASE writer. 

The process is as follows:

  1. read the GDB and use the databasedeleter to delete a record that matches a user parameter (ID).
  2. A new record is created with the same ID (along with some other stuff) and then written back to the same GDB.

Both parts of the operation work correctly if run separately (closing and reopening after step 1), so it looks like the lock on the GDB is not being released when step 1 has completed. In FME 2021 the process was successfully, so just wondering if there is an option that has changed in FME 2024?

 

Will work on providing an example and update soon.


Sorry forgot to mention the writer is INSERT : Create if Needed


Reply