Click here to Skip to main content
14,427,922 members
Rate this:
Please Sign up or sign in to vote.
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
Rate this:
Please Sign up or sign in to vote.

Solution 1

Add a reference to ado library to your project.


[Off the top of my head, haven't used VB6 for aaaaaaaages.]
   
Comments
Dylan Morley 1-Jul-11 9:26am
   
Yep, that's right. Set a reference to Microsoft Activex Data Objects 2.7 \ 2.8?
Rate this:
Please Sign up or sign in to vote.

Solution 2

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
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100