Skip to main content
Solved

Not able to update a field in a FGDB using FeatureWriter


nea
Contributor
Forum|alt.badge.img+9
  • Contributor

II read from a FGDB do some processing then I want to write back (update) to a field in the same FGDB.  I have a FeatureHolder immediately  after reading the FGDB to force complete reading before writing.  The Where clause  make sure I only update records with matching PremiseIDs (original source data and stream data).  I only want to update one field but I don’t see how to specify that field in the FeatureWriter.  In a AttributeManager before the writer I remove all other attributes than the one I want written.  Not working.

 

Best answer by frro

Hi,

I believe it’s better to use OBJECTID under Columns for updates.

Only let through the update features and just keep the OBJECTID and the Premise_ID attributes and you should be fine.

This works for me:

 

Cheers!

View original
Did this help you find an answer to your question?

2 replies

frro
Contributor
Forum|alt.badge.img+11
  • Contributor
  • Best Answer
  • May 20, 2024

Hi,

I believe it’s better to use OBJECTID under Columns for updates.

Only let through the update features and just keep the OBJECTID and the Premise_ID attributes and you should be fine.

This works for me:

 

Cheers!


nea
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • May 21, 2024

Thank you so much.  This worked great!!   This makes so much sense to use the OBJECTID field.  So with this update option there is no way to specify a field to update.  In my case It is OK.  I’m just use to the SQL type Update which allows for specifying a field. 

 

Thanks again.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings