This method submits changes made in the recodset to the data source associated with the layer.


Namespace: ActualMap
Assembly: ActualMap (in ActualMap.dll)

Syntax

Visual Basic (Declaration)
Public Sub Update()
C#
public void Update()
C++
public:
 void Update() sealed 
J#
public void Update()
JScript
public  function Update()

Return Value

The method returns a Recordset object.

Exceptions

Exception TypeCondition
ExceptionThrown when an error occurs.

Remarks

This method supports spatial database layers derived from the SpatialDatabaseLayer.

The database table must have a primary key, otherwise updated records will not be submitted to the database.

Example

 Copy Code
SqlServerLayer sqlLayer = new SqlServerLayer(connString, "parcels", "GEOMETRY");
layer.FieldList = "ID, TYPE,OWNER";
layer.DataType = SqlServerDataType.Geometry;

Layer layer = map.AddLayer(sqlLayer);
layer.EnablePassthroughQuery = true;

Recordset rs = layer.SearchExpression("ID = 2403370");
if (!rs.EOF)
{
    rs["TYPE"] = 200;
    rs["OWNER"] = "R. Smith";
    rs.Shape = new Polygon(points);
    rs.Update();
}

See Also