I create a ShapeFileFeatureLayer with a list of DbfColumn
One of the DbfColumn is type Date
col = new DbfColumn(“date”, DbfColumnType.Date, 8, 0);
And one with type Logical
col = new DbfColumn(“valid”, DbfColumnType.Logical, 1, 0);
I try to update a value in a feature
f.ColumnValues.Add(“date”,???); What about the DateTime.Now ???
And
f.ColumnValues.Add(“valid”,???); Is it “True”, “1”, …
The DbfColumnType.Date format is YYYYMMDD(for example 20160326) and the size of DbfColumnType.Logical is 1 byte, the default value is “?”. “Y” or “y”( Yes), “N” or “n”( No), “F” or “f” (False), “T” or “t”(True).
The code are as follows:
// Date in format - YYYYMMDD
shapeFileFeatureSource.UpdateDbfData(features[0].ColumnValues[“id”], “date”, DateTime.Now.Date.ToString(“yyyyMMdd”));
// ? - Default
// Y,y - Yes
// N,n - No
// F,f - False
// T,t - True
shapeFileFeatureSource.UpdateDbfData(features[0].ColumnValues[“id”], “valid”, “T”);