Quantcast
Channel: FLEXquarters.com Limited
Viewing all articles
Browse latest Browse all 313

How to run QODBC applications on a repeating/nightly basis

$
0
0

How to use QODBC with Windows scheduler /  How to use KA-Firetask with QODBC / How to run QODBC applications on a repeating/nightly basis

 

Problem Description 1:

My application needs read data from QuickBooks and update data in SQL server, up-to this I can able to handle everything. But I need solution for task scheduler, my need is my application needs to run every one hour through task scheduler, I'm trying this, but it saying error message like:

"Could not start QuickBooks"

 

Problem Description 2:

I have a batch file that runs a query using the QODBC driver. It runs perfectly when I logged in, but when I run it as scheduled task I get this error:

Unable to connect to Quick Books Connection String: DSN=BPCQB_PROD_batch;DFQ=;OpenMode=F;SERVER=QODBC, OLE Automation Error. The source is Microsoft OLE DB Provider for ODBC Drivers." [QODBC] Server Edition of QODBC is required to use the DCOM Servers."

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

 

Solution :

 

Windows Scheduler has changed from Desktop base to Service based from Vista or Win7 onwards, and the new OS has the Scheduler as Service based. 

QuickBook and QODBC are desktop base application/driver.

QODBC uses QuickBooks SDK, and QuickBooks SDK uses QuickBooks Application to get data from company file.

QuickBooks SDK requires an active desktop session ( someone to is logged in ) to the machine because QuickBooks is a desktop base application. If no one logged on the server/machine, you will get the error "Could not start QuickBooks".

Even if you have specified the username/password and have a user logged into the machine, you may notice the same error.  This is because task executed from Task Scheduler runs as a different user / new session.

The workaround is to use a Desktop Based Scheduler like KA FireTask or http://alternativeto.net/software/task-scheduler/?platform=windows.

 

How to use KA-Firetask with QODBC

You can download KA Firetask from below mentioned link:

Download KA Firetask

After downloading KA Firetask, please install it on your machine.

After Installation please start KA Firetask and add task by "New Task" button.

 

Please enter Task Title, Task timings (when the task should be executed?), Task action, File location then save task by clicking "OK" button.

In this example, I am scheduling VBA script which fetch data from QuickBooks.

 

Click Ok to save the job.  You can view all the scheduled tasks under the tab "Tasks"

 


 


Viewing all articles
Browse latest Browse all 313

Trending Articles