'打开表Sedimentation_result_tab,准备写入计算的变形量
ReDim strTempCurrentCycle(1 To m)
For i = 1 To m
strOraRS = "SELECT * from SEDIMENTATION_RESULT_TAB"
Set rsDeformation = New ADODB.Recordset
rsDeformation.ActiveConnection = OraDB
rsDeformation.CursorLocation = adUseServer
rsDeformation.Open strOraRS, OraDB, adOpenKeyset, adLockPessimistic
strTempCurrentCycle(i) = strReferenceCycle
If rsDeformation.EOF = True Then
rsDeformation.AddNew
End If rsDeformation!POINT_NAME = cmbSurveyPoint.List(i - 1)
If strReferenceCycle <> frmSelectCycle.lstSelCycle.Text Then
rsDeformation!LINE_NO = strTempCurrentCycle(i)
rsDeformation!SEDIMENTATIONPT_CURRENTVLAUE = dblTempReferDZ(i)
Else
rsDeformation!LINE_NO = 0
rsDeformation!SEDIMENTATIONPT_CURRENTVLAUE = 0
End If
rsDeformation.Update
rsDeformation.Close
Next i
Set rsSurveyValue = Nothing
Set rsDeformation = Nothing
上面就是我的代码,,多多指教啊??
ReDim strTempCurrentCycle(1 To m)
For i = 1 To m
strOraRS = "SELECT * from SEDIMENTATION_RESULT_TAB"
Set rsDeformation = New ADODB.Recordset
rsDeformation.ActiveConnection = OraDB
rsDeformation.CursorLocation = adUseServer
rsDeformation.Open strOraRS, OraDB, adOpenKeyset, adLockPessimistic
strTempCurrentCycle(i) = strReferenceCycle
If rsDeformation.EOF = True Then
rsDeformation.AddNew
End If rsDeformation!POINT_NAME = cmbSurveyPoint.List(i - 1)
If strReferenceCycle <> frmSelectCycle.lstSelCycle.Text Then
rsDeformation!LINE_NO = strTempCurrentCycle(i)
rsDeformation!SEDIMENTATIONPT_CURRENTVLAUE = dblTempReferDZ(i)
Else
rsDeformation!LINE_NO = 0
rsDeformation!SEDIMENTATIONPT_CURRENTVLAUE = 0
End If
rsDeformation.Update
rsDeformation.Close
Next i
Set rsSurveyValue = Nothing
Set rsDeformation = Nothing
上面就是我的代码,,多多指教啊??
汗。。n久没碰过VB了