Error: Run-time error 5019: Update failed
When editing an ArcSDE layer in MapObjects, the following errors may occur:
Run-time error 5017: Edit failed
Run-time error 5019: Update failed
The Shape field value in the record may contain a NULL value. Return the value of the ExtendedErrorString property on the DataConnection object. If the value returned is 'Column is NULL', the Shape field contains a NULL.
Solution or Workaround
Convert each NULL shape value to NIL. You will need to do this in a C program. MapObjects does not support this functionality.
Contact the Developer Support Group for sample C code.
A NULL shape has no FeatureID (FID) and no geometric data. There is an entry in the Business Table but no entry in the Feature Table. The Update method in MapObjects fails because it can't find the FeatureID.
Another test is to compare the number of entries in the Business Table against the number of entries in the Feature Table. When these values differ, your layer contains NULL shapes.
A NIL shape, on the other hand, has an entry in the Business Table and an entry in the Feature Table. Thus, a NIL shape has a FeatureID (FID). MapObjects uses this FeatureID to access the record and can successfully Update.
A known Microsoft limitation prevents converting NULL shapes to NILs in SQLServer.