eliprandi

assigning guid value to guid field in .net c#

Discussion created by eliprandi on Aug 4, 2011
Latest reply on Aug 5, 2011 by eliprandi
Hi,
This seems to be a trivial thing: we want to use a GUID field (not GlobalID) onto a feature class to correlate each feature with an entity in another system. We declared the type as GUID in ArcCatalog, all other fields are just fine for writing, but when we try to write to a feature using IFeature.set_Value(index,value), we get the following errors:
- if we use a value of type System.Guid directly, we get: "The value type is incompatible with the field type."
- if we use System.Guid.ToString("N"), we get:"A general error when something is wrong with a Field" (yeah, thanks for that one esri!)

Other details: Using ArcGIS 10.0 SP2 (build 3200) against a SQL Express personnal SDE. The SQL Type of the field is Uniqueidentifier.

Thanks in advance for any pointers.

Regards,

Eric.

Outcomes