PC Review


Reply
Thread Tools Rate Thread

ADO Connection stopped working

 
 
Tod
Guest
Posts: n/a
 
      9th Jul 2004
I have an Excel workbook that connects to an Access
database on the same machine. The workbook has ADO code to
connect to the database. It has worked for years. Recently
I had to move all of this stuff over to another machine. I
copied everything over without any changes EXCEPT:

- The original machine used Windows XP as the OS. The new
machine is Windows 2000 Professional.

- On the original machine I was running Office XP. The new
machine is using Office 2000. I had to convert the
database to Access 2000, but made no other changes.

Now when I run the code in the workbook it gets to this
line:

'Dim cn as New ADODB.Connection
cn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=C:\MyPath\MyDatabase.mdb;"

The error is:

Method 'Open' of object '_Connection' failed

I can open the database manually and run queries with no
problems.

Could someone recommend possible solutions?

tod


 
Reply With Quote
 
 
 
 
Ron
Guest
Posts: n/a
 
      9th Jul 2004
Tod,
Have you checked the references of the workbook on the
2000 machine? Could it be that the Data Objects library on
the XP machine is later than the one available on the 2000
machine? For example you may have been using version 2.7
on the XP machine and only have 2.5 on the 2000 machine.
Worth a look anyway.
>-----Original Message-----
>I have an Excel workbook that connects to an Access
>database on the same machine. The workbook has ADO code

to
>connect to the database. It has worked for years.

Recently
>I had to move all of this stuff over to another machine.

I
>copied everything over without any changes EXCEPT:
>
>- The original machine used Windows XP as the OS. The new
>machine is Windows 2000 Professional.
>
>- On the original machine I was running Office XP. The

new
>machine is using Office 2000. I had to convert the
>database to Access 2000, but made no other changes.
>
>Now when I run the code in the workbook it gets to this
>line:
>
>'Dim cn as New ADODB.Connection
>cn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
> "Dbq=C:\MyPath\MyDatabase.mdb;"
>
>The error is:
>
>Method 'Open' of object '_Connection' failed
>
>I can open the database manually and run queries with no
>problems.
>
>Could someone recommend possible solutions?
>
>tod
>
>
>.
>

 
Reply With Quote
 
Tod
Guest
Posts: n/a
 
      10th Jul 2004
That's what it was. I downloaded MDAC 2.8 and solved the
problem.

thanx,
tod
>-----Original Message-----
>Tod,
>Have you checked the references of the workbook on the
>2000 machine? Could it be that the Data Objects library

on
>the XP machine is later than the one available on the

2000
>machine? For example you may have been using version 2.7
>on the XP machine and only have 2.5 on the 2000 machine.
>Worth a look anyway.
>>-----Original Message-----
>>I have an Excel workbook that connects to an Access
>>database on the same machine. The workbook has ADO code

>to
>>connect to the database. It has worked for years.

>Recently
>>I had to move all of this stuff over to another

machine.
>I
>>copied everything over without any changes EXCEPT:
>>
>>- The original machine used Windows XP as the OS. The

new
>>machine is Windows 2000 Professional.
>>
>>- On the original machine I was running Office XP. The

>new
>>machine is using Office 2000. I had to convert the
>>database to Access 2000, but made no other changes.
>>
>>Now when I run the code in the workbook it gets to this
>>line:
>>
>>'Dim cn as New ADODB.Connection
>>cn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
>> "Dbq=C:\MyPath\MyDatabase.mdb;"
>>
>>The error is:
>>
>>Method 'Open' of object '_Connection' failed
>>
>>I can open the database manually and run queries with

no
>>problems.
>>
>>Could someone recommend possible solutions?
>>
>>tod
>>
>>
>>.
>>

>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wireless connection stopped working M Skabialka Windows Vista Hardware 11 20th Nov 2008 10:26 PM
ethernet connection stopped working =?Utf-8?B?Qi5KLg==?= Windows XP Networking 1 5th Aug 2007 12:49 AM
RDC problem. Connection just stopped working. =?Utf-8?B?Qm9i?= Windows XP Networking 0 21st Feb 2007 08:43 PM
Win XP Internet connection stopped working paulroskilly@hotmail.com Windows XP Networking 5 11th May 2006 09:59 PM
Re: Remote Connection Stopped Working Colin M. McGroarty Windows XP Work Remotely 0 25th Sep 2003 09:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:27 AM.