Knowledgebase
[QODBC-ALL] How FQSaveToCache works
Posted by Rajendra Dewani (QODBC Support) on 25 November 2025 12:33 PM

How FQSaveToCache works

How FQSaveToCache Works

The process involves a sequence of INSERT statements for the line items of a transaction, with the FQSaveToCache flag controlling when the data is sent to QuickBooks.2

1. Caching the Lines (FQSaveToCache = 1 or TRUE)

  • For the first line item INSERT statement, and all subsequent intermediate line items, you must set the FQSaveToCache value to 1 OR TRUE

    • Action: When QODBC sees this value, it takes the data from the INSERT statement and stores it locally in a cache specific to your current QODBC connection.

    • Result: The data is not yet written to the QuickBooks company file.

  • Example (Conceptual):

    SQL
     
    INSERT INTO "InvoiceLine" (...) VALUES (..., 1) -- First line, cache it
    INSERT INTO "InvoiceLine" (...) VALUES (..., 1) -- Second line, cache it

 

2. Finalizing and Writing the Transaction ( FQSaveToCache = 0 or FALSE)

  • For the last line item INSERT statement for that transaction, you must set the FQSaveToCache value to 0 OR FALSE. If you do not include FQSaveToCache field and value in the insert statement, it will be considered as FQSaveToCache =0

    • Action: When QODBC sees this value, it performs two main steps:

      1. It combines the data from this final INSERT statement with all the previous cached line items for the same connection.

      2. It sends this complete, combined transaction (header and all lines) as a single batch to QuickBooks via the QuickBooks SDK.

    • Result: The complete transaction is now permanently saved in your QuickBooks company file.

  • Example (Conceptual):

    SQL
     
    INSERT INTO "InvoiceLine" (...) VALUES (..., 0) -- Final line, write all cached lines + this line to QuickBooks
    

 

 
(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please complete the captcha below (we use this to prevent automated submissions).