作爲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)
任何幫助將不勝感激
'BYVAL記錄作爲ADODB.Recordset'是不一樣的簽名,你是事件試圖委託給這個子。 – OneFineDay 2014-12-02 20:09:58
http://technet.microsoft.com/en-us/ms675134(v=vs.71).aspx – Steve 2014-12-02 20:11:06
@OneFineDay對不起,看來我寫錯子那裏。我更新了分。 – Navron 2014-12-02 20:16:50