ADODB Fails with Run-time error '-2147024769 (8007007f)

  • Thread starter Thread starter AndyB
  • Start date Start date
A

AndyB

Hi, this is simple access 2000 stuff.

Sub OpenDB()
Dim strConn As String
Dim objConn As New ADODB.Connection

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\aspdatastore\database.mdb"

objConn.Open strConn
*
* Do something here
*
Set objConn = Nothing
End Sub

I have three systems with access2000 on them. Two of them work as expected.
One system fails with a Visual Basic Run-time error Method 'Open' of object
'_Connection' failed.
I've run MDAC 2.8 and Jet service pack 8 upgrade to no avail.
Has anyone got any ideas ?
Taa.
AndyB
 
Could it be a permissions issue? Can you connect to the mdb by other
means? Could it be a network issue? you have to look outside your code
if it works fine on one system but not another.

--Mary
 
The database is on the PC i am working with.
I am currently making my database accessible through a web site and so are
using Visual Studio.net 2003.
I've had problems running the site and have noticed everything crashes at
the point of accessing the database with an adodb connection.
So i decided to fire up access 2000 and put some simple connection code into
a module (expecting it to work). It doesn't work.

So i then copied the lot to another PC, ran access module and it works.

It leaves me with the idea that there's a windows file screwed up somewhere.
And the total lack of information available on the net about the error
message doesn't help.

So, i'll probably end up having to reinstall/repair windows XP pro.
 
I've cracked it!!!.
I found the answer at http://dbforums.com/t804226.html which points to the
answer
on microsoft.public.sqlserver.connect newsgroup via google groups.
My version of oledb32.dll was incorrect.
My version is now the version from the MDAC2.7SP1.

Both my Visual Studio AND Access 2000 are now working correctly.

Thanx anyway Mary.
Cya.
 
I encountered a similar problem when the network-guys upgraded my 2000 Pro
web server to 2003 Server. The 2000 server previously had MDAC v2.8 but
during the upgrade MOST of it was reverted to v2.7. I got similar ADODB
errors afterwards with SQL Server. I ended up copying a good v2.8 OLEDB32.DLL
into DLLCache first and then overwrote the one in the usual MDAC location. It
was fine afterwards.
 
Back
Top