You are here: > ESRI Forums > arcgis engine forums > Thread Replies

ArcGIS Engine Forums

ArcGIS Engine: ArcObjects .NET API forum

Error with CreateFeature in SDE Layer   Steven Teller Sep 04, 2007
Re: Error with CreateFeature in SDE Layer   Michael Knight Sep 04, 2007
Re: Error with CreateFeature in SDE Layer   Steven Teller Sep 05, 2007
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Error with CreateFeature in SDE Layer 
Author Steven Teller 
Date Sep 04, 2007 
Message Howdy,

I am getting an error every time I call the CreateFeature method on IFeatureClass. I am trying to add a feature to an empty SDE layer. When the error occurs, StartEditing and StartEditOperation have already been called. The error message is as follows: 'Shapes of this entity type not allowed in this layer'. Note that this error happens before I even get a chance to assign a shape to the new feature.

I have been searching the documentation and the forums for a couple of days with no success. The same code works fine when dealing with shapefiles or layers in a personal geodatabase.

Thanks for any help,

Steve 
  Steve Teller
Software Engineer
Silvics Solutions, LLC
Birmingham, AL 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Error with CreateFeature in SDE Layer 
Author Michael Knight 
Date Sep 04, 2007 
Message The response to this thread might help:

http://forums.esri.com/Thread.asp?c=2&f=59&t=96864#269668 
  Michael Knight
GIS Solutions Architect
Contract Land Staff, LLC
Stafford, Texas

http://www.contractlandstaff.com

 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Error with CreateFeature in SDE Layer 
Author Steven Teller 
Date Sep 05, 2007 
Message Thanks very much for taking the time to reply to my question. The thread you pointed me to provided exactly the information I needed and solved my problem.

To me it is interesting that ArcCatalog indicated that the shape field on my layer would allow nulls even though it would not. I had to add n to the entity mask to solve my problem. For anyone interested, the command line to do this is:

sdelayer -o alter -l layername,shape -e na+ ...

This assumes you need a layer that supports multi-part polygons.

Nowhere in ESRI's documentation was this mentioned. I am relatively new to the ArcGIS Engine/ArcSDE world but have spent a good bit of time with the documentation and thought I had a fairly good grasp of how things are supposed to work. I am not looking forward to all the other gotchas that may be lurking in the shadows.

Thanks again for taking the time to help me out.

Steve 
  Steve Teller
Software Engineer
Silvics Solutions, LLC
Birmingham, AL