Knowledgebase: Tutorials
[QODBC-Desktop] Troubleshooting - QB Begin Session Failed. Error = 80040417
Posted by Jack - QODBC Support on 10 November 2014 02:52 PM

Troubleshooting - QB Begin Session Failed. Error = 80040417

Problem Description:

When using your QODBC Driver with my custom application, coded in Java, the application is able to connect and retrieve data if QuickBooks is running with the company file already open.

However, when the QuickBooks program is NOT running on the local machine, the QODBC is supposed to be able to connect to the database on its own, in the background.

I am consistently getting "80040417" error.

Begin Session Failed. S0000 00000 [QODBC] QB Begin Session Failed. Error = 80040417, If the QuickBooks company data file is not open, a call to the "BeginSession" method must include the name of the data file.

Please let me know what I am doing wrong.


The 80040417 error is occurring when company file path specified on QODBC Setup Screen is different from Company file opened in QuickBooks.

Please verify your auto login setup, after you set auto-login, you can access QuickBooks without open it. Please refer below article for more information:

How to setup QODBC for Auto-login into QuickBooks

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

When you setup Auto-login, Please verify the company file path on QODBC and QuickBooks, these two paths should be the same. You can find QODBC company file path via QODBC setup screen -> General tab. You could find the QuickBooks company file via QuickBooks UI, press F2 key you will see the file information.

Please note, you can connect to only one company file at a time if you want to connect to another company file you need to disconnect the connection from your application and connect to another company file.

(0 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please complete the captcha below (we use this to prevent automated submissions).