Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database problem - Compile Error

Status
Not open for further replies.

1ooo1

Technical User
Jan 20, 2003
50
AU
Hi,
I am a newbie, using VB6, When I use the VB Application Wizard to try and teach myself a bit about Databases, Using the NorthWind Db as the record source, I keep on getting an error "Compile error - User-Defined type, not defined." with the following line highlighted in the code.

Private Sub datPrimaryRS_WillChangeRecord(ByVal adReason As ADODB.EventReasonEnum, ByVal cRecords As Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)

I assumed that the wizard would 'Do the right thing !!' what has gone wrong, is there something I am missing here?

Ken
 

Change your ado reference to ADO 2.1 or higher.

You should also update to VB6 SP5 if you haven't done so already.
 
Thanx CCLINT, have done the ADO part, will have to look into getting the service pack downloaded, but now I am getting the following error...
"Procedure declaration does not match description of event or procedure having the same name"
What is that all about???

Ken
 
I have got ADO 2.7 selected.
 

That's fine.
Not everyone has ADO 2.6 or 2.7 or 2.8, but what I was getting at was that you needed a minimum of ADO 2.5 (I believe)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top