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 : 8004041c - Apache/PHP - Login checkedSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC Installation Support Forum

 New Topic 
 
 Post Reply 
[1]  
 8004041c - Apache/PHP - Login checked 
 Author   Message 
  TomD 
  
 Group: Members 
 Posts: 1 
 Joined: 2006-10-26 
 Profile
 Posted : 2006-10-26 13:13:57
I can't seem to get rid of this error from a PHP script.

I checked the log-in setttings, etc. and they appear to match your instructions.

The VB Demo works wonderfully.

The PHP code where it is stalling follows:

  $constr = "Driver={QODBC Driver for QuickBooks};";
  $constr = $constr."DFQ=C:\Program Files\Intuit\QuickBooks 2006\sample_service-based business.qbw;";
  $constr = $constr."OpenMode=M;OLE DB Services=-2;";
  echo "<p>.....about to attempt connection...</p>\n";
  echo "<p><b><i>".$constr."</i></b></p>\n";
  if (!$conn = new COM("ADODB.Connection")) exit ("Unable to create an ADODB connection<br>");
  $conn->Open($constr);
  echo "<p>.....must be open......returning connection...</p>\n";
  return $conn;

The error sent through to the calling page is below:

.....about to attempt connection...

Driver={QODBC Driver for QuickBooks};DFQ=C:\Program Files\Intuit\QuickBooks 2006\sample_service-based business.qbw;OpenMode=M;OLE DB Services=-2;


Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> Microsoft OLE DB Provider for ODBC Drivers<br/><b>Description:</b> [QODBC] QB Begin Session Failed. Error = 8004041c, An internal QuickBooks error occurred while trying to access the QuickBooks company data file. ' in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\reipitt-projects-qb.php:101 Stack trace: #0 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\reipitt-projects-qb.php(101): com->Open('Driver={QODBC D...') #1 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\reipitt-projects-qb.php(65): GetDbConn() #2 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\reipitt-projects-qb.php(31): GetCustomers() #3 {main} thrown in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\reipitt-projects-qb.php on line 101

Thanks in advance for input you may be able to provide.
 

 
TomD 
 
  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-10-26 13:55:03

QuickBooks needs to be closed, but the company file must be configured for unattended mode access. See: How do I setup QODBC to auto-login into QuickBooks and start it if it's not running? 

If you are running the PHP script in a browser, then the QODBC DCOMs need to be setup. See: How can I see QuickBooks data in a Internet Explorer Browser using Windows XP? for what I mean.

There's a updated version of DisplaySQL.php that can be found at: PHP samples or help?

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to