Select to view content in your preferred language

IRow.Store() vs ITableWrite.WriteChangedRows()

2901
3
05-13-2013 05:58 AM
JasonPike
Frequent Contributor
Can someone explain to me the differences between these two calls (other than the parameter differences)?

There is a warning about calling IRow.Store() from an edit event, but the documentation on ITableWrite.WriteChangedRows() seems to be sparse on details.

I have code that was using ITableWrite.WriteChangedRows() to commit some changes that are cached. In 9.3.1, ITableWrite.WriteChangedRows() resulted in the update of the related annotation. However, in 10.1, the related annotation is no longer updated by this call. If I use IRow.Store() instead, the related annotation is updated.

Thanks for any insights.
0 Kudos
3 Replies
LeoDonahue
Deactivated User
From the Java docs on ITableWrite:

http://resources.arcgis.com/en/help/arcobjects-java/api/arcobjects/com/esri/arcgis/geodatabase/ITabl...

WriteChangedRows also calls WriteRows, which writes a set of rows to the database without polymorphic object update behavior.  I'm assuming that means you don't get annotation updates.
0 Kudos
JasonPike
Frequent Contributor
From the Java docs on ITableWrite:

http://resources.arcgis.com/en/help/arcobjects-java/api/arcobjects/com/esri/arcgis/geodatabase/ITabl...

WriteChangedRows also calls WriteRows, which writes a set of rows to the database without polymorphic object update behavior.  I'm assuming that means you don't get annotation updates.


Leo,

Perhaps that is the case, but there are some inconsistencies:

A) This same code updated the annotation in version 9.3.1.

B) I've created a test that attempted reproduce annotation not being updated when WriteChangedRows() was used. However, the annotation is updated in my simple example. I have attached the personal database, MXD, and VBA macro.

Workflow:
1) Open WriteChangedRows.mxd
2) Select �??Start Editing�?� in the Editor toolbar�??s Editing combo box
3) Invoke the Select Features tool in the Tools toolbar
4) Select the point with the annotation �??Hello world�?�
5) Customize -> VBA Macros -> Visual Basic Editor
6) File -> Import File�?�
7) Navigate to WriteChangedRows.cls
😎 Run the macro
9) Observe that annotation is properly updated

Finally, I've shown that changing my existing code to call IRow.Store() rather than ITableWrite.WriteChangedRows() results in the annotation getting updated. I'd like to understand the differences so that I can understand why ITableWrite.WriteChangedRows() is no longer working for me.

Thanks!
Jason
0 Kudos
by Anonymous User
Not applicable
ITablewrite is a really low interface to support specific custom feature implementations and some NetCDF functions. It bypasses most of what .Store provides and as such should be used with caution, if at all outside these cases.
There's some brief information at the bottom of Updating features in the sdk help.
0 Kudos