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 checked | Where |
|---|---|
| BeginSession and the company file mismatch | Intuit Desktop SDK guide |
| How to check which company file a session opened | Intuit Desktop SDK tips |
| QBFC error shown as a signed decimal | Stack Overflow question |
Check it yourself
- On the machine running the integration, compare the open company file with the full
.QBWpath that the connector passes toBeginSession. - 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. CallGetCurrentCompanyFileNameimmediately 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.