"User-defined type not defined"

"User-defined type not defined"

Post by Ishamb » Fri, 22 Mar 2002 03:07:11



When I enter the following code in a subroutine:

Dim conn As ADODB.Connection

and run the program, I get an error saying "User-defined type not defined."

All the tutorials say that this is the right code to enter. Can anyone please
help me with this and tell me what is the problem?

 
 
 

"User-defined type not defined"

Post by Mike » Fri, 22 Mar 2002 03:09:44


Are you referencing ActiveX Data Objects in the project?


Quote:>When I enter the following code in a subroutine:

>Dim conn As ADODB.Connection

>and run the program, I get an error saying "User-defined type not defined."

>All the tutorials say that this is the right code to enter. Can anyone please
>help me with this and tell me what is the problem?

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

 
 
 

"User-defined type not defined"

Post by Ishamb » Fri, 22 Mar 2002 03:11:25



>Are you referencing ActiveX Data Objects in the project?

How do I do that?
 
 
 

"User-defined type not defined"

Post by Mike » Fri, 22 Mar 2002 03:14:05


Project | References

Check the "Microsoft ActiveX Data Objects x.x" box



>>Are you referencing ActiveX Data Objects in the project?

>How do I do that?

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
 
 
 

"User-defined type not defined"

Post by Ishamb » Fri, 22 Mar 2002 03:32:31


Hi Mike,

I've selected Project | References, and there is no entry there for "Microsoft
ActiveX Data Objects x.x". Is my Visual Basic software incomplete? How do I get
around this problem?

Thanks,

Ilya.

 
 
 

"User-defined type not defined"

Post by Val Mazu » Fri, 22 Mar 2002 03:43:50


Hi,

To be able to use ADO, first you need to add reference to
it from your VB application. Got to Project, References
menu option and check Microsoft ActiveX Data Objects ...

Val

Quote:>-----Original Message-----
>When I enter the following code in a subroutine:

>Dim conn As ADODB.Connection

>and run the program, I get an error saying "User-defined
type not defined."

>All the tutorials say that this is the right code to

enter. Can anyone please
Quote:>help me with this and tell me what is the problem?
>.

 
 
 

"User-defined type not defined"

Post by Ishamb » Fri, 22 Mar 2002 03:54:15


Ok, nevermind. I found it. Thank you very much!