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
Re: Can't create ADODB.Connection
My guess is the ADODB drivers aren't installed. Try downloading the MDAC and see if that helps.
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) :(
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.
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....
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.
Re: Can't create ADODB.Connection
Just a simple miss.
Set cnn_to = Server.CreateObject("ADODB.Connection")
Re: Can't create ADODB.Connection
If it is an ASP you need to use Server.CreateObject. For .vbs you only use CreateObject.
Re: Can't create ADODB.Connection
It's a .vbs and it works fine on two computers just not on the third one!
Jeeze!