Unable To Instantiate TRIM Database: 80040154

I recently came across this error while attempting to connect to TRIM 6 R2 via the TRIMSDKRetrieving the COM class factory for component with CLSID {8A354548-6BCB-11D3-B273-00A0C9FC3DC0} failed due to the following error: 80040154.

This was a little alarming because it was using the same data adapter as a few other TRIM projects, which were working fine; the only difference between the project was that this particular project was a WPF application, and all of the other applications were ASP.NET applications. This particular application had also previously worked fine, the only change was that I had been upgraded to a 64-bit environment.

After a bit of playing around and research, I discovered the TRIM SDK will not connect under a 64-bit process.


  1. In Visual Studio, right-click your project and go to Properties (last item).
  2. Select the Build tab.
  3. Change the Configuration option to All Configurations.
  4. Change the Platform Target to x86.

This will ensure that your application will only run under an x86 architecture, and will be able to connect to TRIM even on a 64-bit host.

Looking at the QuickSpecs for TRIM 7 it is being based on a 64-bit architecture and therefore this issue should be eliminated come TRIM 7 (in addition to some SDK enhancements and UI integration tools).