Skip to main content
Hi

 

We have some java code that used FME Objects 2013 and we upgraded it to 2015. Some of our tests started to fail. When I investigated I found that in the log it says

 

 

WARN |MS SQL Server (Spatial) Writer: The fme_db_operation attribute value 'DELETE' on feature conflicts with Feature Operation 'Insert'. Rejecting feature

 

 

In documentation there is a description of Feature Operation parameter but I tried to specify it in various ways and it still didn't work. For example:

 

 

IFMEStringArray params = fmeSession.createStringArray();

 

IFMEStringArray directives = fmeSession.createStringArray();

 

params.append("Feature Operation"); // tried FEATURE_OPERATION etc.

 

params.append("fme_db_operation");

 

IFMEUniversalWriter fmeWriter = fmeSession .createWriter("MSSQL_SPATIAL", directives);

 

fmeWriter.open("fme_datastore_test", params);

 

...

 

fmeFeature.setStringAttribute("fme_db_operation", "DELETE");

 

fmeWriter.write(fmeFeature);

 

 

What am I doing wrong? It's hard to understand from documentation what actual parameter's name is ("Feature Operation"?) and how "format parameters" are passed to writers - as parameters in 'open' or as directives in 'createWriter'?

 

 

Thank you.
Hi

 

 

Have a look at this post regarding how to use the FMEDialog() class to show you the syntax for the different directives.

 

 

David

Reply