[QODBC-Desktop] - Optimizer Completion and Payroll Data Access
Problem Description:
Customer was unable to retrieve transaction data from QuickBooks via QODBC Desktop, receiving the error message "You must subscribe to a payroll service to read this information. HRESULT=0x80042772". The customer had not previously required a payroll subscription, and no recent QuickBooks or QODBC configuration changes had occurred. Transaction queries using UNOPTIMIZED mode worked correctly, but optimized queries immediately failed with the payroll error.
Affected products: QODBC Desktop, QuickBooks Desktop Expected outcome: Customer understands that the QODBC optimizer must complete its full sync before transaction data becomes accessible via optimized queries.
Symptoms:
- Connection fails when attempting to pull data from QuickBooks via QODBC
- Error message: "You must subscribe to a payroll service to read this information. HRESULT=0x80042772"
- UNOPTIMIZED queries (select * from transaction UNOPTIMIZED) return data correctly
- Optimized queries (select * from transaction) fail immediately with payroll subscription error
- QODBC driver status shows "Waiting on QuickBooks" during optimization processes
Cause:
The QODBC optimizer process (sp_optimizefullsync ALL) was still running and had not completed its full synchronization of all QuickBooks tables. Until the optimizer finishes syncing all tables, optimized queries may incorrectly include payroll-related checks in the query path, triggering the payroll subscription validation error. The QuickBooks SDK does not expose payroll transaction details as standard queryable tables; the optimizer's completion is required before optimized queries function properly.
This is not a licensing issue - the customer did not need a new or additional payroll subscription. The issue resolved once the optimizer completed its process.
Environment:
| Product | Version / Detail |
| QODBC Desktop |
All versions |
| QuickBooks Desktop |
All editions (Pro, Premier, Enterprise) |
| Operating System |
Windows (32-bit and 64-bit) |
Resolution:
- Wait for the optimizer to complete its full sync. Running
sp_optimizefullsync ALL typically takes around 10–12 hours depending on the size of the QuickBooks data file and the number of tables. Do not interrupt this process.
- Test with optimized queries once the driver status changes. After the optimizer completes, the QODBC status window will no longer show "Waiting on QuickBooks." Try running the optimized query again (select * from transaction) to confirm data access is restored.
- If the issue persists after optimizer completion:
- Run
select * from transaction UNOPTIMIZED to verify basic connectivity
- Check that the QODBC driver is activated and the license is valid
- Contact QODBC Support if the payroll subscription error persists
SQL Examples:
After optimizer completion, test optimized query:
SELECT * FROM transaction
Verify UNOPTIMIZED query still works:
SELECT * FROM transaction UNOPTIMIZED WHERE txndate >= {d '2025-06-10'} AND txndate <= {d '2025-07-10'}
Example Scenarios:
Scenario 1 - Optimizer stuck during initial setup:
A customer running sp_optimizefullsync ALL for the first time sees the QODBC status window show "Waiting on QuickBooks" for an extended period. Once the optimization completes, all optimized queries begin returning data correctly without any payroll subscription errors.
Scenario 2 - Optimizer re-running after data changes:
If the customer adds new company data or tables in QuickBooks and re-runs sp_optimizefullsync ALL, the same pattern applies: wait for the optimizer to complete. Interrupting the process may leave the optimizer in an inconsistent state, causing queries to fail until the next optimization run completes successfully.
Additional Notes:
- Optimizer is not a payroll check: The optimizer's full sync process is a table synchronization routine, not a payroll subscription validation. The payroll error message appears because the optimizer had not completed, causing the query path to implicitly include payroll-related checks before sync was done.
- First-time optimization: For customers performing the first-time
sp_optimizefullsync ALL setup, plan for 10–12 hours. The process must complete at least once before optimized queries function correctly.
- Subsequent optimizations: If new tables or data are added to QuickBooks, re-running the optimizer may be necessary. Future runs typically complete faster than the initial sync.
- UNOPTIMIZED queries: Queries using the UNOPTIMIZED suffix (e.g.,
select * from transaction UNOPTIMIZED) bypass the optimizer and work independently. These are useful for testing connectivity while the optimizer is still running.
Related Articles:
Accessing Payroll Data in QODBC: Using SP_reports for Payroll Transactions and Summaries QODBC Optimizer Rebuilding and Troubleshooting QODBC Slow Query Performance after Upgrade
Keywords:
QODBC Desktop Optimizer sp_optimizefullsync Payroll Data QuickBooks Desktop Table Synchronization Transaction Queries SDK Limitation Full Sync Query Performance UNOPTIMIZED
Support Tickets: BZY-213-60959, EJG-648-16861
|