更新Mapx地图的字段
'更新地图的字段
Dim ftr As Feature
Dim rs As ADODB.Recordset
Map1.Layers("油井").KeyField = "name"
For Each ftr In Map1.Layers.Item("油井").AllFeatures
Set rs = oCn.Execute("select * from petro_well where wellname='" & ftr.KeyValue & "'")
If Not rs.EOF Then
ftr.KeyValue = rs("x2")
ftr.Update
End If
Next
Dim ftr As Feature
Dim rs As ADODB.Recordset
Map1.Layers("油井").KeyField = "name"
For Each ftr In Map1.Layers.Item("油井").AllFeatures
Set rs = oCn.Execute("select * from petro_well where wellname='" & ftr.KeyValue & "'")
If Not rs.EOF Then
ftr.KeyValue = rs("x2")
ftr.Update
End If
Next