Microsoft Access Automation Error

Microsoft Access Automation Error Average ratng: 3,8/5 3012 reviews

The Microsoft Excel Support Team Blog The Microsoft Excel Support Team Blog 'Unspecified Automation Error' after applying MS12-060 (updated 9/26) Will Buffington MSFT August 15, 2012 29. Automation of Business Processes (including accounting, CRM, emailing, faxing, and custom document production). Microsoft Access® Data Projects (ADP) upgrades to Microsoft Access.accdb format. Microsoft® Access® Database Developers, Microsoft Access Help, & Microsoft Access Technical Support. Free Microsoft® Access® Database Templates.

  1. Microsoft Access Error Codes
  2. Microsoft Access Automation Error The Remote Procedure Call Failed

Summary



Microsoft Access Automation Error

A .Net 64 bit application automating Microsoft Access throws an error while opening Access database. Same code works fine when run as 32 bit .Net application. Below is the sample code to reproduce this issue:



Microsoft.Office.Interop.Access.Application accessApplication;


accessApplication = new Microsoft.Office.Interop.Access.Application(); Ide ata atapi controllers drivers.


accessApplication.OpenCurrentDatabaseOld('<Path to .accdb file>', true);


Microsoft Access Error Codes


Below is the exception message:


'Unable to cast COM object of type 'system._comObject' to interface type 'Microsoft.Office.Interop.Access.Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{<missing text>}'failed due to the following error: Error loading type library/DLL. (Exception from HRESULT:0x80029C4A(TYPE_E_CANTLOADLIBRARY)).'.





Symptoms



Error message : “Error loading type library/DLL. (Exception from HRESULT:0x80029C4A(TYPE_E_CANTLOADLIBRARY)) “.


Microsoft Access Automation Error The Remote Procedure Call Failed

Microsoft Access Automation Error


Cause



64 bit .Net application is not able to find DAO360.dll which is looked-up during Access automation and is located at 'C:Program Files (x86)Common FilesMicrosoft sharedDAO'. This Path is not listed in the probing directories of .Net application.



Also DAO360.dll is registered only under Wow6432Node and hence 64 bit .Net application is not able to find it via registry lookup.





Resolution



Adding DAO360.dll’s path to ‘PATH’ environment variable resolve this issue. Note that directories listed under PATH environment variable are included in the proving directories of .Net application.



Below is the code to modify ‘PATH’ environment variable in-process. In-process means that changes to PATH environment variable will not be visible outside the process or after application quits. This code should be pasted before instantiating Access.



string PathValue = ';


string sAdd = ';


string strCommonFiles =

May 06, 2019  Important Points: 1) The USB drivers given on this page are officially provided by Sony Xperia Mobiles. So, if you encounter any errors while using them on your Windows computer, contact their support team. 2) If you are not able to find the USB driver for your Sony Xperia smartphone or tablet on this page, let us know by leaving a comment below. May 07, 2019  Download Sony Xperia all models USB Drivers for Windows PC. If you want to connect your Xperia phone to your computer without installing its PC Suite, then download and install the latest USB driver for your device. 340 rows  Sony Xperia USB Drivers allows you to connect your Xperia Smartphone to the computer without the need of any PC Suite Software. Although Sony Officially Provides PC Suite Software which supports all Xperia Smartphones but here we manage to share the drivers separately. The drivers shared on this page might be useful for those who dont believe in installing the Sony PC Suite on their computer. 130 rows  Aug 11, 2015  Download Sony Xperia USB Drivers from here (download the one based on. Sony xperia all usb drivers download for pc. Download Sony Mobile Drivers, Sony USB driver, Sony Xperia Drivers for Windows XP, Vista, 7, 8, 8.1, 10 (32bit or 64bit), Latest Drivers 2018 Download Sony USB Drivers 2019 for all Device About.


System.Environment.GetEnvironmentVariable('CommonProgramFiles(x86)');


sAdd = ';' + strCommonFiles + 'microsoft sharedDAO';


PathValue = System.Environment.GetEnvironmentVariable('Path');


PathValue += sAdd;


bool result = SetEnvironmentVariable('path', PathValue);

-->

When you access Automation objects, specific types of errors can occur. This error has the following possible causes and solutions:

  • An error occurred while executing a method or getting or setting a property of an object variable. The error was reported by the application that created the object.

    Check the properties of the Err object to determine the source and nature of the error. Also try using the On Error Resume Next statement immediately before the accessing statement, and then check for errors immediately following the accessing statement.

  • The Office add-in that you are trying to use has been disabled by your System Administrator.

For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).

Note

Interested in developing solutions that extend the Office experience across multiple platforms? Check out the new Office Add-ins model. Office Add-ins have a small footprint compared to VSTO Add-ins and solutions, and you can build them by using almost any web programming technology, such as HTML5, JavaScript, CSS3, and XML.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.