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 8004041cSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 Error 8004041c 
 Author   Message 
  paulconsulting 
  
 Group: Members 
 Posts: 19 
 Joined: 2006-12-05 
 Profile
 Posted : 2006-12-05 04:05:06

I am using ASP.NET 2005 with QuickBooks 7 and QODBC 7 and I keep getting the error

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

The error happens on the line

sConnectString = "DSN=Quickbooks Data;OLE DB Services=-2;"

oConnection.Open(sConnectString)

I am using the vb sample code on the website. The vb sample app that came with QODBC works fine though.

Any suggestions of what I may be doing wrong?

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-12-05 09:23:50

Unattended mode (auto-login) needs to be setup. See: How do I setup QODBC to auto-login into QuickBooks and start it if it's not running? 

See also: How can I see QuickBooks data in a Internet Explorer Browser using Windows XP? 

 

  Top 
  paulconsulting 
  
 Group: Members 
 Posts: 19 
 Joined: 2006-12-05 
 Profile
 Posted : 2006-12-06 02:02:07
Auto login is set up properly and I still get the same error. 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-12-06 08:35:40
QuickBooks must be closed and not running in order for auto-login mode to work. Check that a unattended mode connection can be made using VB Demo first with QuikBooks closed before trying your ASP.NET 2005 application. 

  Top 
  paulconsulting 
  
 Group: Members 
 Posts: 19 
 Joined: 2006-12-05 
 Profile
 Posted : 2006-12-19 07:58:59

The VB Demo works fine in unattended mode. My ASP.NET app now just hangs and won't return an error or anything. Here is my sample test code.

sConnectString = "DSN=QuickBooks Data;OLE DB Services=-2;"
sSQL = "SELECT FullName FROM Customers"
oConnection = New ADODB.Connection
oRecordset = New ADODB.Recordset
oConnection.Open(sConnectString)

oRecordset.Open(sSQL, oConnection, CursorTypeEnum.adOpenStatic, LockTypeEnum.adLockOptimistic)

Do While (Not oRecordset.EOF) 
      lblCustomer.Text = lblCustomer.Text & oRecordset.Fields("Name").Value & "<br>" 
      oRecordset.MoveNext()
Loop  

oRecordset.Close()
oRecordset = Nothing
oConnection.Close()
oConnection = Nothing

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-12-19 10:08:04

Well I'm guessing that your ASP.NET app is running through a Windows service. Have you setup the QODBC DCOM Servers or the Remote Connector? See: How can I see QuickBooks data in a Internet Explorer Browser using Windows XP? 

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to