作为VB6新手,我正在尝试更新应用程序的旧版本。但是,出现以下代码:
程序声明与具有相同名称的事件或程序的描述不匹配
以下是代码段:
Private Sub ppdatPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum,
ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum,
ByVal pRecordset As ADODB.Recordset)
Dim Position As Long
Position = datPrimaryRS.Recordset.AbsolutePosition
If Position = -1 Then Position = 0
datPrimaryRS.Caption = "Record: " & CStr(Position)
End Sub
错误指向此行:
Private Sub ppdatPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
任何帮助将不胜感激
答案 0 :(得分:2)
正确的签名应该是:
Private Sub ppdatPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, _
ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, _
ByVal pRecordset As ADODB.Recordset20)
更多信息: