Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : Error - QB Begin Session Failed. Error = 8004041cSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v5 Forum

 New Topic 
 
 Post Reply 
[1]  
 Error - QB Begin Session Failed. Error = 8004041c 
 Author   Message 
  Tech 
  
 Group: Members 
 Posts: 5 
 Joined: 2008-11-14 
 Profile
 Posted : 2008-11-14 11:00:00

Hi there,

I am using QODBC version 5.0 and Quickbooks Pro 2005 and when I run a report in my Java file I get the following error:

java.sql.SQLException: [QODBC] QB Begin Session Failed. Error = 8004041c, An internal QuickBooks error occurred while trying to access the QuickBooks company data file.

The same program was working on my old PC which had Quickbooks Pro and QODBC 5.0 and I did a transfer to the new PC and now its not working. Any suggestions? It definitely seems like there is a version conflict but I am not sure.

Appreciate your help,

Tech

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-11-14 17:23:48
Try using VB Demo to establish a connection first. I'm guessing you haven't set unattended mode correctly, see: How do I setup QODBC to auto-login into QuickBooks and start it if it's not running?  

  Top 
  Tech 
  
 Group: Members 
 Posts: 5 
 Joined: 2008-11-14 
 Profile
 Posted : 2008-11-15 03:37:18

Hi Tom

Thanks for the reply. VBDemo is the first thing I tried to connect and I noticed that I did not have a File DSN and so I created one and now I am able to connect fine in VBDemo. I have followed the procedure that you have sent in the link for AutoLogin and that is also all set in my application. Any more suggestions for me getting this error?

Thanks,

Tony

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-11-15 10:28:39

Java would need a System DSN and hopefully you have configired the QODBC DCOMs and have a Web server edition of QODBC? If your new computer has a new version of QuickBooks and you are not running QuickBooks Pro 2005, it's time to download QODBC v9 and purchase a new copy.

If your new computer is a Microsoft Vista machine you will need to upgrade both your copy of QuickBooks and QODBC.

 

  Top 
  Tech 
  
 Group: Members 
 Posts: 5 
 Joined: 2008-11-14 
 Profile
 Posted : 2008-11-21 09:00:37

Hi Tom

I downloaded the new version of QODBC 9.0 (evaluation version) and followed all the steps to configure it to work with Quickbooks 2005. I also tested connection with VB Demo but still when I run my Java file I am getting the same following error:

java.sql.SQLException: [QODBC] QB Begin Session Failed. Error = 8004041c, An internal QuickBooks error occurred while trying to access the QuickBooks company data file.

I am running Windows XP.

Very frustrating - can you please advise?

Thanks,

Tony

 

  Top 
  Tech 
  
 Group: Members 
 Posts: 5 
 Joined: 2008-11-14 
 Profile
 Posted : 2008-11-21 09:03:44

Here is my Java code if that helps at all:

 

try {
   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
   Connection con = DriverManager.getConnection("jdbc:odbc:QuickBooks Data");
   Connection con1 = DriverManager.getConnection("jdbc:odbc:ABC");
  

qrystr="sp_report OpenInvoices show Text, Blank, TxnType, Date, RefNumber, PONumber, Terms, DueDate, Aging, OpenBalance, Memo parameters DateMacro = 'Today'";
   

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-11-21 20:24:57
The company file needs to added to the QuickBooks Data DSN as shown in: How do I setup QODBC to auto-login into QuickBooks and start it if it's not running? and QuickBooks must be closed (not running) when you start your JAVA application. 

  Top 
  Tech 
  
 Group: Members 
 Posts: 5 
 Joined: 2008-11-14 
 Profile
 Posted : 2008-11-22 03:30:06

Hi Tom,

Thanks a lot - Your tip of "QuickBooks must be closed (not running) when you start your JAVA application"  did the trick :-)

Thanks,

Tony

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to