Knowledgebase
[QODBC-Desktop] Troubleshooting: Modal Window causes qbw32.exe to hang in background when opened with QODBC
Posted by brad waddell on 12 March 2009 05:21 PM

Troubleshooting: Modal Window causes qbw32.exe to hang in the background when opened with QODBC

Problem Description 1

I'm running PHP scripts on a Win 2k server to access my company file and export specific tables to CSV files. I've checked the option to allow QODBC to log in automatically and unchecked the Launch QuickBooks UI option. Frequently the scripts will error as below:

Error = 80040414, A modal dialog box is showing in the QuickBooks user interface...

And while my PHP script will stop running, an instance of qbw32.exe will continue running, and the scripts will error with the same message until I manually kill the qbw32.exe process.

I have my scripts set up to run as scheduled tasks from a user that is always logged into the server. Other users log into QuickBooks but do not use the QODBC driver. I've tried turning off all the alerts or pop-up messages for the QODBC QuickBooks user. However, I'm still running into this modal dialog box error, even when no other user is logged into the server. Am I missing some option to make the qbw32.exe process end when my script mistakes out?

I do not want to leave the QODBC user logged into QuickBooks continuously because the other users occasionally have to switch to single-user mode. I would prefer this to be as automated as possible.

Solutions 1

The problem here is that the QuickBooks company file is being opened in both modal and non-modal modes at the same time, so if, for example, someone opens an invoice and your script then tries to create invoices, then you will get an "Error = 80040414, A modal dialog box is showing in the QuickBooks user interface...." which has nothing to do with alerts or pop-up messages. QuickBooks says that a modal connection is active for this part of QuickBooks, and you need to wait.

Usually, the other user would eventually close the Invoice modal screen allowing your script retries to be successful.

BTW: I believe that Intuit has made some errors in making a number of user interface (UI) operations in QuickBooks "modal" to Integrated Applications such as QODBC.

Problem Description 2

That is the problem, though. Even after the other users have logged out, and my scripts have recorded the error message, closed the QODBC connection, and ended, the qbw32.exe process remains. Here is an example of how my writing works if that helps explain the process, all pseudo-code:

Customer script starts
Call odbc connection to QODBC dsn
Determine if the relationship was successful or not
if not successful
the record error message returned by the qodbc driver
close odbc connection
end script with return 2
if successful
begin customer table export to csv file
close odbc connection
send the file to users that need it
end script with return 0

I know the not flourishing condition is being fulfilled because the error message is appended to the customer script error log, and the return code is recorded as 2, not 0. When the script is successful (most of the time), the csv file is created correctly. I hope this makes the process a little clearer. I'm just curious if I'm closing the script prematurely or if something else is causing that process to hang. When the error occurs, any repeat attempts by the hand to run will cause it to give the modal window error until I manually kill the process.

Solutions 2

Sorry, I'm unsure whether the other UI users are on the same server (Terminal Server Sessions) or their workstations. If you are only reading info out of the Customer table, you shouldn't be getting modal errors. I only get modal mistakes if I try to create, for example, an invoice and have the invoice model pane running in QuickBooks on an invoice for the same customer.

I suggest you try to find out what modal pane is interfering here. Walk around all the users and see what they are doing in their QuickBooks session. The company file will also need to always be in Multi-User mode! If the company file is set to a single user, then your script won't work.

 

Problem Description 3

I am having the same trouble, but I am not getting modal error messages. It seems like when I am logged into the server where QODBC and our QB db live. We don't have any problems...but when I'm not logged into it, our script will run fine the first time, but QBW32.EXE remains open, and no further scripts will run without erroring out (which also causes our sales/job management server app to lock up). The only way to fix it is to log into the server and kill the QBW32.EXE process. None of our QB users are getting any error messages. QBW32.EXE won't close on its own if I'm not logged into the server. Any help would be appreciated as our sales staff is getting ready to kill me if I can't get this fixed.

Solutions 3

The server console (local session) on the server must always be logged in. The server can't be left on a login screen waiting for you to come along. Why? Because QuickBooks is an application .... not "true" service.

Note: Intuit changed unattended access and the DBMS backend in QuickBooks 2006. There have been ongoing issues even with R7. The server console (local session) on the server must always be logged in. Upgrading to the latest build of QuickBooks might fix this.

(110 vote(s))
Helpful
Not helpful

Comments (1)
Buckie
20 September 2012 06:44 AM
That's going to make things a lot eisaer from here on out.
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please complete the captcha below (we use this to prevent automated submissions).