Click here to Skip to main content
15,919,479 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
you may laugh when you read this..
im having an error "user defined type is not defined"
but the problem is the error point at this statement
Public Con as New ADODB.Connection...
im using that code many times but when i format my PC recently im having this problem
ive already reinstall my copy of vb6 but still the same
could anyone help me on this..
i glad and thankful for your help..
Posted

Add a reference to ado library to your project.


[Off the top of my head, haven't used VB6 for aaaaaaaages.]
 
Share this answer
 
Comments
Dylan Morley 1-Jul-11 9:26am    
Yep, that's right. Set a reference to Microsoft Activex Data Objects 2.7 \ 2.8?
Take a look at:

this

or

this1

Regarding your statement:
Public Con as New ADODB.Connection

If you're trying to define a new connection it should be:

Dim Con as New ADODB.Connection

BUT, if it's the start of a function, it should be

Public Function Con() As ADODB.Connection
etc
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900