下面的代码,添加一个Field,退出按钮单击事件前,查新增的Field正确,在别的按钮单击事件再次查新增的Field却没有,为什么?
Dim mdatasets As Datasets = Workspace1.Datasources(1).Datasets
Dim m_dataset As SuperMap.Data.Dataset = mdatasets("T_Point1")
'得到数据集的记录集
Dim mDatasetVector As DatasetVector = m_dataset
Dim mRecordset As Recordset = mDatasetVector.GetRecordset(False, CursorType.Dynamic)
Dim m_Field As FieldInfo = New FieldInfo("SjyF1", FieldType.Int16)
m_Field.IsRequired = False '是否必填
m_Field.DefaultValue = 100
m_Field.Caption = "SjyT1"
Dim FieldIndes = mRecordset.GetFieldInfos.Add(m_Field)