Skip to content

QuickBooks Desktop 0x8004040A "A QuickBooks company data file is already open and it is different from the one requested"

Updated

QuickBooks Desktop returns 0x8004040A when BeginSession asks for a different company file from the one currently open.

During BeginSession, QuickBooks Desktop says A QuickBooks company data file is already open and it is different from the one requested. The same error appeared as -2147220470 in the reported QBFC integration.

What we checkedWhere
BeginSession and the company file mismatchIntuit Desktop SDK guide
How to check which company file a session openedIntuit Desktop SDK tips
QBFC error shown as a signed decimalStack Overflow question

Check it yourself

  • On the machine running the integration, compare the open company file with the full .QBW path that the connector passes to BeginSession.
  • If the connector is meant to use another file, close the current company file once its users have finished, then open the intended file and retry.
  • If the connector is designed to work with the file already open, it can pass an empty file name to BeginSession. Call GetCurrentCompanyFileName immediately afterward and verify the file with the user before writing anything.

Still failing?

Send the error code and whether the target file was already open to money@iftodo.ai. Leave out company names and full file paths.

Weekly sync checks for €29 a month

For one Shopify or Square to QuickBooks workflow, we check weekly exports for missing or duplicate records and email you when we find a mismatch. We run a sample first to see whether the two exports have matching references.

Ask for a sample check. We agree how to share exports before starting billing. Cancel by email before your next renewal.