Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
tod tod is offline
external usenet poster
 
Posts: 114
Default ADO Connection stopped working

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
ron ron is offline
external usenet poster
 
Posts: 20
Default ADO Connection stopped working

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


.

  #3   Report Post  
Posted to microsoft.public.excel.programming
tod tod is offline
external usenet poster
 
Posts: 114
Default ADO Connection stopped working

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel stopped working Dunk1957 Excel Discussion (Misc queries) 1 June 26th 09 08:09 PM
Formula stopped working Tony New Users to Excel 2 April 2nd 09 09:50 AM
SumByColor Stopped Working Pattylb Excel Worksheet Functions 2 April 9th 08 08:02 PM
VB Stopped Working [email protected] Excel Worksheet Functions 1 April 28th 05 01:56 PM
Tab stopped working -- SCOTT-- Excel Programming 0 October 2nd 03 09:14 PM


All times are GMT +1. The time now is 01:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"