Results 1 to 9 of 9

Thread: Can't create ADODB.Connection

  1. #1

    Thread Starter
    Addicted Member Guru's Avatar
    Join Date
    May 2000
    Location
    sulking in the cupboard under the stairs
    Posts
    237

    Question Can't create ADODB.Connection

    I have a .vbs file which works fine on two PCs but not on a third.
    It fails when it gets to this line:

    Set cnn_to = CreateObject("ADODB.Connection")


    All three are running XP

    Error: The specified procedure could not be found
    Code: 8007007F


    Any clues?

    Thanks
    Another light-hearted post from Guru

  2. #2
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: Can't create ADODB.Connection

    My guess is the ADODB drivers aren't installed. Try downloading the MDAC and see if that helps.

  3. #3

    Thread Starter
    Addicted Member Guru's Avatar
    Join Date
    May 2000
    Location
    sulking in the cupboard under the stairs
    Posts
    237

    Re: Can't create ADODB.Connection

    Tried that! I downloaded MDAC 2.8 and when I ran the install it said that the components were already included in the version of the operating system (or words to that effect)
    Another light-hearted post from Guru

  4. #4
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: Can't create ADODB.Connection

    Are you trying to connect to an Access DB? I don't think the drivers for access are part of the newer MDAC releases.

  5. #5

    Thread Starter
    Addicted Member Guru's Avatar
    Join Date
    May 2000
    Location
    sulking in the cupboard under the stairs
    Posts
    237

    Re: Can't create ADODB.Connection

    If it was failing at the point where I open the connection string, that could be possible; but it should still create the connection object surely. I create the connection object in the same way whether I'm connecting to Access, Excel or SQL Server....
    Another light-hearted post from Guru

  6. #6
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: Can't create ADODB.Connection

    Quote Originally Posted by Guru
    If it was failing at the point where I open the connection string, that could be possible; but it should still create the connection object surely. I create the connection object in the same way whether I'm connecting to Access, Excel or SQL Server....
    But you are saying it is fail at this line when you are trying to create the object
    Set cnn_to = CreateObject("ADODB.Connection")


    I still think it may be a driver issue. For a quick test you could try creating a UDL and try connecting to the database from the machine you are having problems on.
    Last edited by MarkT; Dec 6th, 2007 at 10:50 AM.

  7. #7
    Member
    Join Date
    Apr 2007
    Location
    Kurdistan, Slemani
    Posts
    43

    Re: Can't create ADODB.Connection

    Just a simple miss.

    Set cnn_to = Server.CreateObject("ADODB.Connection")

  8. #8
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: Can't create ADODB.Connection

    If it is an ASP you need to use Server.CreateObject. For .vbs you only use CreateObject.

  9. #9

    Thread Starter
    Addicted Member Guru's Avatar
    Join Date
    May 2000
    Location
    sulking in the cupboard under the stairs
    Posts
    237

    Re: Can't create ADODB.Connection

    It's a .vbs and it works fine on two computers just not on the third one!

    Jeeze!
    Another light-hearted post from Guru

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