Ali,
Here is the code how to load map from an oracle database and how to add new feature to it. You can see the code is almost the same as editing a shape file.
// Display the Oracle data on map
private void LoadAnOracleVectorLyer()
{
string connectString = "User ID=userId;Password=password;Data Source=192.168.0.167/orcl;";
OracleFeatureLayer oracleLayer = new OracleFeatureLayer(connectString, "USSTATES", "RECID");
oracleLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1;
oracleLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
Map1.StaticOverlay.Layers.Add("oracleLayer", oracleLayer);
}
// Edit a new feature on the Oracle layer
OracleFeatureLayer oracleLayer = (OracleFeatureLayer)Map1.StaticOverlay.Layers["oracleLayer"];
Feature newFeature = new Feature("Polygon((0 0,10 10,10 0,0 0))");
newFeature.ColumnValues.Add("STATE_NAME", "NewState");
oracleLayer.Open();
oracleLayer.FeatureSource.BeginTransaction();
oracleLayer.FeatureSource.AddFeature(newFeature);
oracleLayer.FeatureSource.CommitTransaction();
oracleLayer.FeatureSource.Close();
New Feature Added to the Oracle database
Also, please have a look at the following post where you can find an update assembly about OracleFeatureLayer, in which we have a known bug fixed.
gis.thinkgeo.com/Support/Dis...fault.aspx
Thanks,
Ben