PDA

Click to See Complete Forum and Search --> : VB Database Problem


carvil16
Aug 30th, 2001, 12:49 AM
I am particularily new to VB and am studying from Master Moore. However, whenever I tried the database example that use the :
Dim DB as Database
or any other objects like this, I always get the following error code:

Compile Error :
User-defined type not defined.

and DB as Database is highlighted.


What cause this and HOW can I correct it so that I can get beyond this point?

Thanks

:o

Beacon
Aug 30th, 2001, 02:29 AM
You've got to use either the ado reference which i doubt he's talking about or dao reference in ya project!!

A simple way:
See that control in ya toolbox 2nd row from the bottom on the right?
Thats the datacontrol draw that on your form and give it a shot now!

aknisely
Aug 30th, 2001, 08:20 AM
You have to make sure that the DAO/ADO object libraries are referenced properly...

Project->References->Select the corresponding library (HINT: They both start with Microsoft)