原字段名为admincode,想改为countycode
自己的写的代码如下,望大佬解决下问题出在哪里
string path = @"E:\anhui.udb";
Datasource ds = Openudb(path);
Dataset dt = ds.Datasets["village"];
DatasetVector dv = dt as DatasetVector;
Recordset rst = dv.GetRecordset(false, CursorType.Dynamic);
rst.Edit();
FieldInfos fis = rst.GetFieldInfos();
FieldInfo fi1 = new FieldInfo();
fi1.Type = FieldType.Text;
fi1.Name = "countycode";
fis.Modify("admincode",fi1);
rst.Update();