得到recordset的多种方法:
1: datasetVector.Query(“SmID>100”,CursorType.static) à得到recordset
2: QueryParameter parameter=new …..
Parameter.AttributeFilter=……
..
datasetVector.Query(parameter) à 得到recordset
3: datasetVector.GetRecordset(false,CursorType.Dynamic) à recordset
这里的false 表示获得datasetVector的所有记录集。如果为true 则获得一个空的记录集
4:已知一个selection 得到recordset:
recordsetSelected = arrSelections[0].ToRecordset();
arrSelections[0]是一个selection的集合。
得到方法:
Selection[] arrSelections = m_mapControl.Map.FindSelection(true);
if (arrSelections != null && arrSelections.Length != 0)
{
//把选择集转化为记录集
recordsetSelected = arrSelections[0].ToRecordset();