VBA Macro - OLE Database Connection Error

VBA Macro - OLE Database Connection Error

Anonymous
Not applicable
5,241 Views
3 Replies
Message 1 of 4

VBA Macro - OLE Database Connection Error

Anonymous
Not applicable

I am receiving the following message when trying a run a VBA macro in Inventor 2014.

 

Run-time error '3706':

Provider cannot be found.  It may not be properly installed.

 

It occurs at this line of code:

 

'Open connection
With oCN
    .Provider = "Microsoft.ACE.OLEDB.12.0"
    .ConnectionString = sConnection
    .Open
End With

I have a reference to the Microsoft ActiveX Data Objects 2.8 Library.  I believe that the problem is related to the reference because this macro worked fine in 2011.

 

I am running Windows 7 64 bit and MS Office 32 bit.  I have installed the Microsoft Access Database Engine 2010 Redistributable exe.  I have tried changing the reference to 2.7 and 6.0 but I still get the error.

 

Any ideas on how to fix this?

 

0 Likes
Accepted solutions (1)
5,242 Views
3 Replies
Replies (3)
Message 2 of 4

adam.nagy
Autodesk Support
Autodesk Support

Hi,

 

I think you'll find this useful: http://forums.autodesk.com/t5/NET/32bit-AND-64bit-environment-database-connectivity/td-p/2925668

 

Cheers,



Adam Nagy
Autodesk Platform Services
0 Likes
Message 3 of 4

ekinsb
Alumni
Alumni
Accepted solution

You might also find this post useful.

 

http://modthemachine.typepad.com/my_weblog/2013/09/using-ms-access-databases-with-inventor-2014-vba....


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes
Message 4 of 4

Anonymous
Not applicable

Thanks for the info and explanations Adam and Brian.  Very helpful.

 

You may be able to install the exe via command line using -> AccessDatabaseEngine_x64.exe /passive

0 Likes