Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a feature class in SDE that has various fields where the setting AllowNulls is set to FALSE.

When creating a feature in ArcMap in this feature class it still allows nulls to be specified in the attributes, albeit an empty text string. I can then save my edits without any error messages.

What's going on?

Thanks Rob

share|improve this question
add comment

2 Answers

I think you are confusing an Empty String, with a NULL Value.

An Empty String is a unique string of length zero. This means that there are data in the field that represent a string.

That is different than a Null, which indicates that data do not exist.

To test for this, try selecting a feature in the attribute table, then calculate values on the field. In the field calculator, type NULL.

enter image description here

If it is working correctly, it should throw an error when you try to do this.

share|improve this answer
    
Yes the calculator won't work by that still doesn't work for features created in an edit session. So when created they just have empty string of which is accepted. Even if I specify NULL or <Null> as the default value in the feature class properties it still doesn't prompt the user to enter values. Any ideas? –  Rob Jun 8 '12 at 7:28
add comment
up vote 0 down vote accepted

Seems to be by design:

Allow Nulls—This controls whether the field will have a NOT NULL constraint on it when the field is created. If "Allow Null Values" is set to "No," the field definition in the database will contain the NOT NULL constraint. If, on the other hand, you stay with the default of "Yes," the field will be NULLABLE.

Note: The Geodatabase model is such that it will insert an empty value (numeric = 0, text = "") instead of a database NULL if, and only if, the field has a NOT NULL constraint on it. The Allow Null Values property of a field cannot be changed once the field has been added to the feature class or table. Allow Null Values = NO cannot be specified for a field being added to a feature class or table that is already populated.

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002200000002000000.htm

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.