For Each n As String In DataTables("产品").GetValues("GPS产品名称", "GPS产品名称 is not null")
Dim dr1 As DataRow = DataTables("产品").Find("GPS产品名称 = '" & n & "'", "日期")
Dim dr2 As DataRow = DataTables("产品").Find("GPS产品名称 = '" & n & "'", "日期 desc")
Dim fdr As DataRow = DataTables("表C").Find("第一列 = '" & n & "'")
If fdr Is Nothing Then
fdr = DataTables("表C").AddNew
fdr("第一列") = n
End If
Dim x1 As Double = dr1("经度")
Dim y1 As Double = dr1("纬度")
Dim x2 As Double = dr2("经度")
Dim y2 As Double = dr2("纬度")
Dim rad As Double = 6371
Dim p1X As Double = X1 / 180 * Math.PI
Dim p1Y As Double = Y2 / 180 * Math.PI
Dim p2X As Double = X2 / 180 * Math.PI
Dim p2Y As Double = Y2 / 180 * Math.PI
Dim result As Double = Math.Acos(Math.Sin(p1Y) * Math.Sin(p2Y) + Math.Cos(p1Y) * Math.Cos(p2Y) * Math.Cos(p2X - p1X)) * rad
fdr("第二列") = result
Next
这段代码是把值赋值到C表中的第二列,我想把上面那段得出的结果也赋值到C表中的第三列 怎么做啊?甜老师