Knowledgebase
[QODBC-Desktop] After upgrading to QuickBooks, QODBC "auto-login" unattended mode no longer works / Error = 8004040a, A QuickBooks company data file is already open and it is different from the one requested
Posted by brad waddell on 12 March 2009 05:21 PM

Troubleshooting: Get Error 8004040a after Update the Driver

Problem Description 1

     I updated the driver, and now it will not connect to the company file. I'm getting error = 8004040a. It says the company file is already open and different from the one requested. I only have one company file.

Solutions 1

     The error is that you have QODBC unattended mode setup as per "Locate a company file" as below, but QuickBooks is already running with a different company file open.

It would help if you verified the company file path on QODBC and QuickBooks. These two paths should be the same. The QODBC company file path can be found via the QODBC setup screen -> General tab.

You can find the QuickBooks company file via QuickBooks UI; press the F2 key to see the file information.

 OR  

You can select "Use the Company file that's open in QuickBooks" and test again.

Problem Description 2

     Now it can connect to our file. Here's another problem. I used to run queries in Access. Now when I run my question, no new data shows up. All it has is the data that was put in when I did the link table the first time around. It is used to update the tables.

Solutions 2

     Try unlinking and relinking the Linked QODBC tables in MS Access.

 

Troubleshooting: A QuickBooks company data file is already open and different from the one requested. Error Explanation 1

Problem Description

    This message, "A QuickBooks company data file is already open, and it is different from the one requested.", has the following explanation:
    The QODBC Driver uses the QuickBooks SDK, limited to the features of the standard QuickBooks desktop product, which cannot open multiple company files. You must only open one company file at a time on a single machine.

     There is only one file. However, I have QuickBooks open to the file I am trying to connect to, and I am instructing the connection to that file. Why am I getting this message?

Solutions

Use the company file that's now open in QuickBooks

    If QODBC is set up to "Use the company files that are now open in QuickBooks" as follows, it works as expected.

Locate a company file

    But if you "Locate a company file,"

    Then QuickBooks must not already have a company file open ........ Even if it's the same company file!!!

 

Troubleshooting: QB Begin Session Failed. Error = 8004040a Explanation 2

Problem Description 

     I followed the instructions at http://www.qodbc.com/QODBCweb.htm  to download and install the demo for the QODBC server edition. I can run TestDCOM.asp - which shows me that DCOM is configured properly. When I go to the QODBC Setup Screen and click the Test Connection button on the General tab - I now get a successful connection. I can also get a successful connection from the ODBC admin. However, when I run my ASP code, it hits the line:
     c.Open "dsn=QuickBooks Data"
     It bombs and gives me the following message:
     QB Begin Session Failed. Error = 8004040a, A QuickBooks company data file is already open and is different from the one requested.

Solutions

     The message is saying the company files currently open in QuickBooks are different from the path of the company file setup in your QODBC Setup for the DSN:

     Try closing the company file and let QODBC open the company file.

Please refer:

 How to setup QODBC for Auto-login into QuickBooks 

 How to set up QODBC Driver to auto-connect to QuickBooks. (Video) 

 

(203 vote(s))
Helpful
Not helpful

Comments (1)
Kevin stratton
07 March 2013 01:40 PM
I'm using QODBC 13.0 and QBES 13.0.
So does all this mean that I can only use QODBC one of two ways. I would like my Excel file to work whether Quickbooks is open or not. I can get it to work just fine with Quickbooks closed - the setup using a designated company file. In otherwords, Auto-login works just fine. But if I try to refresh the Excel worksheet with Quickbooks open, I get the error of "Begin Session Failed.Error = 8004040a, A Quickbooks company data file is already open and it is different from the one requested or there are multiple company files open."

I've read the above replies and multiple FAQ answers that say multiple company files can't be open. So does that mean that I can't use QODBC populated Excel spreadsheet with Quickbooks already open.
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please complete the captcha below (we use this to prevent automated submissions).