Unrecognized Database Format - After Install SP4

foongkim
01-14-2001, 10:37 AM
Hellp guys, if you pay attention to previous problem which the database linking between VB6 and Access
2000 now be solve after i have install the Service Packs 4. Yes, solve already for the step which is
usually encounter when i have install the SP4, but another new problem come after this as i predicted
before. ANd this problem is syntax problem and I am totaly no idea how to solve it...

For those who are first view my problem, I want to explain in here. I intended to link my project with
Access database using Data Form Wizard which only need few steps to do so and it's very easy. Before
i install SP4 for Visual Studio from Microsoft, the VB can not recognized the Access 2000 format. So
I download it and install into my PC. After that, there is another problem come after me.

I would like to ask again for those who recommanded me to download the SP4 or anyone else who kow this
problem before to help.

When i compile the projecy, this things out:

Compiler Error:
Procedure Declarations doesn't match desription of events or procedures having the same name.

and the code is here:

Private Sub Form_Unload(Cancel As Integer)
Screen.MousePointer = vbDefault
End Sub

Private Sub datPrimaryRS_Error(ByVal ErrorNumber As Long, Description As String, ByVal Scode As Long,
ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, fCancelDisplay As Boolean)
'This is where you would put error handling code
'If you want to ignore errors, comment out the next line
'If you want to trap them, add code here to handle them
MsgBox "Data error event hit err:" & Description
End Sub

Private Sub datPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error,
adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
'This will display the current record position for this recordset
datPrimaryRS.Caption = "Record: " & CStr(datPrimaryRS.Recordset.AbsolutePosition)
End Sub

Private Sub datPrimaryRS_WillChangeRecord(ByVal adReason As ADODB.EventReasonEnum, ByVal cRecords As
Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
'This is where you put validation code
'This event gets called when the following actions occur
Dim bCancel As Boolean

Select Case adReason
Case adRsnAddNew
Case adRsnClose
Case adRsnDelete
Case adRsnFirstChange
Case adRsnMove
Case adRsnRequery
Case adRsnResynch
Case adRsnUndoAddNew
Case adRsnUndoDelete
Case adRsnUndoUpdate
Case adRsnUpdate
End Select

If bCancel Then adStatus = adStatusCancel
End Sub

Private Sub cmdAdd_Click()
On Error GoTo AddErr
datPrimaryRS.Recordset.AddNew

Exit Sub
AddErr:
MsgBox Err.Description
End Sub

Private Sub cmdDelete_Click()
On Error GoTo DeleteErr
With datPrimaryRS.Recordset
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
Exit Sub
DeleteErr:
MsgBox Err.Description
End Sub

Private Sub cmdRefresh_Click()
'This is only needed for multi user apps
On Error GoTo RefreshErr
datPrimaryRS.Refresh
Exit Sub
RefreshErr:
MsgBox Err.Description
End Sub

Private Sub cmdUpdate_Click()
On Error GoTo UpdateErr

datPrimaryRS.Recordset.UpdateBatch adAffectAll
Exit Sub
UpdateErr:
MsgBox Err.Description
End Sub

Private Sub cmdClose_Click()
Unload Me
End Sub


And for your information, this code is generated by Visual Basic after i choose to link to database
using wizard!

Thanks!

VBGOD
01-22-2001, 06:13 PM
1) Check the refrences
2) If you are using datacontrols - you must change the connect property to be "Access 2000;" instead of "Access"

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum