Results 1 to 3 of 3

Thread: Declare Connection Object

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Posts
    11

    Declare Connection Object

    I am trying to declare a connection object in the main.bas module of my VB6 project.

    I have tried the following statements:

    Dim db As ADODB.Connection

    and

    Dim db As Connection

    I get the following compile error for both

    "User-defined type not defined"

    Can anyone help?

    Thanks

    Roger

  2. #2
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724
    You need to reference the ADO library:
    Project > References > Microsoft ActiveX Data Objects 2.x

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Posts
    11
    Thanks.

    That makes all the diference, I didn't come across it in my book and I find MSDN to be something of a nightmare to consult.

    Roger

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width