473,394 Members | 1,902 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

CurrentProject.Connection failure

Hi all.

I'm having a serious problem when i'm trying to use the
CurrentProject.Connection property for some ADO manipulation.

Here's the error message i'm getting:

Run-time error '-2147220999 (800401f9)':
Method 'Connection' of object '_CurrentProject' failed

In the immediate window, i try to execute this statement:

Msgbox CurrentProject.Connection

but again i get a funky error with the same error code as above:

Automation error
Error in the DLL

I got this error working on two different machines, both running
Windows XP.
I'm using MS Access 2002 (10.6501.6626) SP3

Any help will be greatly appreciated.
Alex

Jul 31 '06 #1
6 13465
Sometimes it helps to post your code where you are having issues. You
need to have a varriable set up for your connection.
Dim cn as ADODB.Connection

Now set cn to your project's connection.

Set cn = CurrentProject.Connection

You would now use cn for whatever you need to do.

Hope that helps!

alex.hatzisavas wrote:
Hi all.

I'm having a serious problem when i'm trying to use the
CurrentProject.Connection property for some ADO manipulation.

Here's the error message i'm getting:

Run-time error '-2147220999 (800401f9)':
Method 'Connection' of object '_CurrentProject' failed

In the immediate window, i try to execute this statement:

Msgbox CurrentProject.Connection

but again i get a funky error with the same error code as above:

Automation error
Error in the DLL

I got this error working on two different machines, both running
Windows XP.
I'm using MS Access 2002 (10.6501.6626) SP3

Any help will be greatly appreciated.
Alex
Jul 31 '06 #2
"Jeff L" <jl*******@hotmail.comwrote in news:1154369718.982525.237050
@p79g2000cwp.googlegroups.com:
Sometimes it helps to post your code where you are having issues. You
need to have a varriable set up for your connection.
No.

--
Lyle Fairfield
Jul 31 '06 #3

Tried this, didn't work.
The problem has to do with a certain functionality of Access being
corrupted.
Would a re-installation help?
Lyle Fairfield wrote:
"Jeff L" <jl*******@hotmail.comwrote in news:1154369718.982525.237050
@p79g2000cwp.googlegroups.com:
Sometimes it helps to post your code where you are having issues. You
need to have a varriable set up for your connection.

No.

--
Lyle Fairfield
Aug 1 '06 #4
alex.hatzisavas wrote:
Tried this, didn't work.
The problem has to do with a certain functionality of Access being
corrupted.
Would a re-installation help?
I would try running the MDAC component checker found at:

http://www.microsoft.com/downloads/d...displaylang=en

In the past it has identified for me inconsistencies between the
version of Access and the completeness of the installation of certain
components of MDAC. These inconsistencies resulted in problems with
CurrentProject.Connection; I'm sorry that I cannot remember the details
(I've shut them out of my mind, actually as ITs position was that the
application was flawed, when in fact, their installation of Office or
Windows was flawed; some tension developed at that time, but component
checker supported my position) so I cannot say if they were identical
with yours.

In any case, before resinstalling Access I would try installing the
latest version of MDAC, available from the same site, or its parent.; I
suspect it would be much simpler and just or more likely to cure the
problem.

Aug 1 '06 #5

Hi Lyle, and thanks very much.
I tried installing MDAC 2.7 RTM (which is the only one that would get
installed on my machine), but it didn't work.
Also tried using alternative statements (codeproject etc.) but no luck.
So i think i'll just reinstall the product and hope to solve this.

Alex
Lyle Fairfield wrote:
alex.hatzisavas wrote:
Tried this, didn't work.
The problem has to do with a certain functionality of Access being
corrupted.
Would a re-installation help?

I would try running the MDAC component checker found at:

http://www.microsoft.com/downloads/d...displaylang=en

In the past it has identified for me inconsistencies between the
version of Access and the completeness of the installation of certain
components of MDAC. These inconsistencies resulted in problems with
CurrentProject.Connection; I'm sorry that I cannot remember the details
(I've shut them out of my mind, actually as ITs position was that the
application was flawed, when in fact, their installation of Office or
Windows was flawed; some tension developed at that time, but component
checker supported my position) so I cannot say if they were identical
with yours.

In any case, before resinstalling Access I would try installing the
latest version of MDAC, available from the same site, or its parent.; I
suspect it would be much simpler and just or more likely to cure the
problem.
Aug 1 '06 #6

Ok, here's the solution -or, in any case, what worked on my pc- for
this
mysterious bug with CurrentProject.Connection...

Here's the saviour-resource :-)...

http://msauer.mvps.org/images/error.pdf

Steps (1) & (2) are useful for checking MDAC versions and if there are
any
missing files there, but the 'beef' comes with (3) & (4).

For (3), use WinZip to extract the files of the MDAC that corresponds
to
your version of Windows (e.g. MDAC 2.8 SP1) to a temporary folder.

For (4), again use WinZip to extract the files of "mdacxpak" in another

folder.

Then go to folder C:\Windows\inf, find "mdac" (setup information file),

right-click on it and select install as the instructions specify.

During installation, you will probably need to use the Search utility
of
Windows to locate various DLLs (i certainly had to to locate 4-5 DLLs
in
various folders).

In my case the problem was solved once the pc was rebooted.


alex.hatzisavas wrote:
Hi Lyle, and thanks very much.
I tried installing MDAC 2.7 RTM (which is the only one that would get
installed on my machine), but it didn't work.
Also tried using alternative statements (codeproject etc.) but no luck.
So i think i'll just reinstall the product and hope to solve this.

Alex
Lyle Fairfield wrote:
alex.hatzisavas wrote:
Tried this, didn't work.
The problem has to do with a certain functionality of Access being
corrupted.
Would a re-installation help?
I would try running the MDAC component checker found at:

http://www.microsoft.com/downloads/d...displaylang=en

In the past it has identified for me inconsistencies between the
version of Access and the completeness of the installation of certain
components of MDAC. These inconsistencies resulted in problems with
CurrentProject.Connection; I'm sorry that I cannot remember the details
(I've shut them out of my mind, actually as ITs position was that the
application was flawed, when in fact, their installation of Office or
Windows was flawed; some tension developed at that time, but component
checker supported my position) so I cannot say if they were identical
with yours.

In any case, before resinstalling Access I would try installing the
latest version of MDAC, available from the same site, or its parent.; I
suspect it would be much simpler and just or more likely to cure the
problem.
Aug 14 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: AMC | last post by:
Hi, I'm using an include file to store the connection string to a database. Whenever I try to reference that string to open a connection in the page that includes the file I get the error 'empy...
0
by: Steve Morris | last post by:
Why does CurrentProject.Connection.Execute "qryStoresImport5ToStage", RecordsAffected, adCmdText return the error: Run-time error'-2147217900(80040e14)': Invalid SQL statement; Expected...
3
by: Ol!v!é | last post by:
I have an ADP Project in MsAccess XP, with an MSSQL-backand (MSDE). I would like to set the Connection of the project from VBA, so all the forms and reports can use it. Normally, I set this...
7
by: Lauren Quantrell | last post by:
I used to force a new connection between my Access 2K database and a SQL Server backend every time the user launches the application, but it seemed very slow, in fact using a timer function, I...
1
by: carmela_wong | last post by:
Hello all, I had a database in MS Access 2003 which I converted to Access 97. The "CurrentProject" object causes an error in the code that was automatically written by Access when I created the...
0
by: cyberdwarf | last post by:
Hi y'all I like to be able to trap the OnClose event for the CurrentProject.Connection in my ADE. As this is a very large project, I can't see where, or how I should insert the code to...
3
by: pvrsatya | last post by:
hi all i am using TCP/Ip i am running server application in one PC client application in other PC i am connecting these thro PC's in LAN If i remove the LAN cable
3
by: tulika dutta | last post by:
after 8 hrs my MySQL connection with JDBC gets time out. It gives the error java.sql.SQLException: No operations allowed after connection closed.Connection was implicitly closed due to underlying...
6
Cintury
by: Cintury | last post by:
Hi all, I've developed a mobile application for windows mobile 5.0 that has been in use for a while (1 year and a couple of months). It was developed in visual studios 2005 with a back-end sql...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.