1

I have a Quickbooks "Integrated Application" written in C# using QBFC 12.0. It is installed and working correctly at a number of sites with several versions of Quickbooks. Today I tried to install it at a new site with Quickbooks 2012 Premiere. To authorize the application to connect it is necessary to open QB, logging in as the QB administrator, then initiate a connection from the integrated application. This has to be done each time I install the application at a new site. In this case, when I attempt to initiate the connection, I get the following error message:

Can't Open Quickbooks. Quickbooks can't start because it is already running. Only Quickbooks Accountant and Quickbooks Enterprise can open more than one company file.

Since my application is trying to access the same company file that is already open, this message is misleading. Looking into the QBSDKLog.txt, I find the following:

20131010.152314 I   5324    RequestProcessor    ========= Started Connection =========
20131010.152314 I   5324    RequestProcessor    Request Processor, QBXMLRP2 v11.0
20131010.152314 I   5324    RequestProcessor    Connection opened by app named 'IOS     Briefcase Sync'
20131010.152314 I   5324    RequestProcessor    OS: Microsoft Windows 7 Professional Service Pack 1 (build 7601), 32-bit
20131010.152314 I   5324    RequestProcessor    Current Process is elevated
20131010.152314 I   5324    RequestProcessor    Current User is in AdminGroup
20131010.152314 I   5324    RequestProcessor    Current Process is ran as Admin
20131010.152314 I   5324    RequestProcessor    Current Process Integrity Level : 3000
20131010.152314 I   5324    RequestProcessor    Getting the IUnknown COM instance of QB
20131010.152514 E   5324    RequestProcessor    An internal error occured while looking for a running instance of QuickBooks and getting its COM reference. Cannot continue. hr = 80080005
20131010.152514 E   5324    RequestProcessor    Could not find or create an instance of QuickBooks using InstanceFinder hr = 8004041c
20131010.152514 I   5324    RequestProcessor    Connection closed by app named 'IOS Briefcase Sync'
20131010.152514 I   5324    RequestProcessor    ========== Ended Connection ==========

Any idea what might be causing the COM errors?

AndyL
  • 81
  • 1
  • 8
  • 1
    I think this may be related to http://stackoverflow.com/questions/17409766/qbsdk-gets-could-not-start-quickbooks-after-update-to-2012-pro-r14 . Make sure that you have installed the latest update for QB 2012. I would also suggest that the update is done in the program (Help>Update QuickBooks>Update Now) as the internal update seems to download more than the update files on Intuit's website. – Hpjchobbes Oct 14 '13 at 15:13
  • Did you resolve this issue? If so please let me know how. Thanks – user1253073 Nov 12 '13 at 17:37

1 Answers1

5

I had a similar problem, was getting the "Can't Open Quickbooks. Quickbooks can't start because it is already running." error.

In some situations I was also getting "If the QuickBooks company data file is not open, a call to the BeginSession method must include the name of the data file." when QuickBooks definitely did have a data file open.

I finally traced it down to the QBINSTANCEFINDER17.INI file (C:\ProgramData\INTUIT\QuickBooks\QBINSTANCEFINDER17.INI). I cleared the entries in this file and everything now works.

QuickBooks uses the QBINSTANCEFINDER ini file to keep track of open instances. Apparently when a QBW32.exe process gets shut down abnormally, entries in this file are not always cleared as they should be. Usually that doesn't cause problems but can in certain circumstances.

EDIT: Comment...

I have also discovered that there must be a security token problem (or something similar) at work in some situations. On a Windows 7 64-bit system I've found that I cannot access QuickBooks from my application when running it under control of a debugger (Delphi 2007). However, the same .EXE file, if copied to its normal installation folder beneath Program Files (x86) when run can access QuickBooks just fine.

Otherwise (run from the debugger, or even just from my development folder) what always happens is that the running QuickBooks instance is not detected and the QBXML calls cause a 2nd instance of QuickBooks to be started, resulting in the errors you describe.

Mark Wilsdorf
  • 751
  • 1
  • 5
  • 18