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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compile error: user defined type not defined

Status
Not open for further replies.

carmenl

Programmer
May 1, 2002
3
CA
Hi! I need help with a project that I am developing using VB6 and SQL Server. I am setting up a connection that will allow my program to find a file on the network and delete it. I have the following declartions at the top of my form:
Public oConn A Nw ADODB.connection (in my code module where I build the connection)
Public rs As Recordset (in my main form, to find the pathname I need for the delete)
When I try to run, I get the error:
Compile error: User-defined type not defined
I do not understand what is happening as these shouldn't be considered user-defined types. If you have any ideas, please help!
Thanks!
 
You need to include the ActiveX Data Object library. You will find it under Project->References. Check the box next to the Microsoft ActiveX Data Object Library (latest version that you have) and Apply.

At this point, these data types (connection and recordset) will now be known to the compiler.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top