Solved

Compiling error: User-Define type not Defined

Posted on 2012-03-30
10
1,136 Views
Last Modified: 2012-04-02
I am using VB6. On Compiling exe file it is showing attached error on line :

 Dim Strm As ADODB.Stream

Please help me. I am unable to compile .exe file
Capture.JPG
0
Comment
Question by:Mehram
10 Comments
 
LVL 6

Expert Comment

by:ingriT
ID: 37786518
Have you set a reference in your project to the Microsoft Data Objects?

On the Project menu, click to select References, and then set a reference to the Microsoft ActiveX Data Objects 2.5 Object Library.
0
 

Author Comment

by:Mehram
ID: 37786531
Yes I tried that but it was showing attached error.
Capture.JPG
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786544
Could you post a capture of the references you already have?
0
 
LVL 8

Expert Comment

by:gpizzuto
ID: 37786548
welcome in Windows 7 ...
0
 

Author Comment

by:Mehram
ID: 37786562
Please find attached requested file.
Capture.JPG
Capture1.JPG
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 6

Expert Comment

by:ingriT
ID: 37786591
It looks like you're running an x64 development machine. The DLL's are probably x86. Can you set a target CPU somewhere in the properties? Try setting that to x86.
0
 

Author Comment

by:Mehram
ID: 37786601
How could i do that, please do me favor.
0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786605
I'm not running a VB6 IDE here, so I can't do that sorry.

Try google a little further maybe.
0
 

Author Comment

by:Mehram
ID: 37786612
Just for your information I am facing same error on windows server 2003 32 bit
0
 
LVL 15

Accepted Solution

by:
eemit earned 500 total points
ID: 37787239
Hi Mehram,
Stream Object was introduced in
Microsoft ActiveX Data Objects  2.5 Library.

You have set a reference in your project to the:
    Microsoft ActiveX Data Objects 2.0 Library.
Select:
    Microsoft ActiveX Data Objects 2.5 Library
from the list.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now