AnsweredAssumed Answered

Storing NULL-value into row with not-null constraint

Question asked by HimBromBeere on Nov 18, 2016
Latest reply on Jan 20, 2017 by HimBromBeere

Today I´ve encountered a really bad issue when stroing features to my geodatabase (I´m using a FileGDB, but colluegues of mine said it also occurs on SDE or MDB).

 

I created a new feature and set one of its values to NULL using

IFeature.set_Value(theFieldIndex, null)

. As the field has a not-null-constraint on it (checked it in ArcCatalog) I see its value is somehow converted to an empty string which I find really annoying. I´d expected to get an error when storing the feature as it violates the constraint. Swallowing the error and set it to an empty string is absolutely inacceptable as the empty string may be a valid value as well. However we can´t distinguish valid empty strings with invalid ones any more.

 

Is this intended behaviour? If so can I bypass it?

Outcomes