Knowledgebase
[QODBC-ALL] How to cancel FQSaveToCache in QODBC
Posted by Jack - QODBC Support on 05 August 2014 11:56 AM

How to cancel FQSaveToCache in QODBC

Problem Description:

We have some code to insert multiple lines into the invoice table. We understand how the 'FQSaveToCache' field is used during this process. And the code is running successfully until we found an issue. After 1st line inserting, the 2nd line may have missing d data, so the code decides to stop inserting. However, the 1st line is still in the cache. It might be inserted into QB with the following other invoices. So we need to know how to cancel the insertion and remove everything from the cache before it starts to insert other invoices. Can you let us know which command we should call?

Solutions:

Multi-line inserts require a series of SQL statements to complete a single transaction.

The key to this process is the field named "FQSaveToCache." This field is not part of the table but is used as a flag to the QODBC driver. The value of "FQSaveToCache" is set to 1, or TRUE for the first line item inserts statements, and then it is set to 0 or FALSE for the final statement.

A TRUE setting of "FQSaveToCache" instructs QODBC to take the values from your INSERT statement and hold them for later processing but not to save them to QuickBooks yet. When QODBC receives the final transaction where the cache is set to 0 or FALSE, the contents of the current INSERT statement will be combined with all of the previous INSERT statements held in the cache for this connection saved as a batch into QuickBooks.

QODBC maintains a connection for each application using the driver. This cache is specific for each connection, so multiple applications or users of QODBC will not interfere with the cached transactions of other users. There is no limit to the number of lines cached for a single transaction other than what QuickBooks would limit you to.

I want to suggest you, please close/dispose of your current connection with QODBC & connect it again. When the connection is closed with QODBC, QODBC will cancel FQSaveToCache for that particular connection.        

(2 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).