I am having trouble adding features to an MsSql2008FeatureLayer. The code appears to run properly, but the record is not added to the feature table. Are there any known issues here?
MsSql2008FeatureLayer MapLayer = new MsSql2008FeatureLayer(MapConnString, Tablename, "ID");
MapLayer.Srid = 0;
MapLayer.Open();
Dictionary<string, string> DictionaryValues = new Dictionary<string, string>(feature.ColumnValues);
DictionaryValues["Id"] = NextGenProject.DataInterface.GetNextID(MapLayer.TableName).ToString();
DictionaryValues["FeatureType"] = genFeature.GetWellKnownType().ToString();
if (genFeature.GetWellKnownType() != WellKnownType.Point)
{
DictionaryValues["Angle"] = "";
DictionaryValues["FeatureText"] = "";
DictionaryValues["RScale"] = "";
DictionaryValues["DBText"] = "";
DictionaryValues["PSymbol"] = "";
DictionaryValues["TextJust"] = "";
}
DictionaryValues["ZoomLevel"] = i.ToString();
MapLayer.EditTools.BeginTransaction();
MapLayer.EditTools.Add(genFeature, DictionaryValues);
MapLayer.EditTools.CommitTransaction();
MapLayer.Close();