dcsimg
Results 1 to 2 of 2

Thread: ADODB.Connection object not recognized

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2012
    Posts
    6

    ADODB.Connection object not recognized

    Hello,

    I am fairly new to VB and have just started my first code. I want to create a connection to an SQL database, and I used the standard VBA code:

    Code:
    Dim c As ADODB.Connection
    Set c = New ADODB.Connection
        c.Open "DSN=fusion"
    However, when I try to run this program, my editor gives me an error saying 'the type defined by the user is undefined'. What does this error mean, and how do I rectify it? Is this a problem of the header files? In that case, how do I include the relevant headers?

  2. #2
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Re: ADODB.Connection object not recognized

    u need to set the refference, see the ADO tutorial in my signature.
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


Tags for this Thread

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width