Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : Empty/Clear Cache - FQSaveToCacheSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Sample Scripts Forum

 New Topic 
 
 Post Reply 
[1]  
 Empty/Clear Cache - FQSaveToCache 
 Author   Message 
  jrademan 
  
 Group: Members 
 Posts: 29 
 Joined: 2007-01-27 
 Profile
 Posted : 2007-11-06 09:10:57
Hi

Has there been any change to the Cache in the latest version of QODBC
Is there an elegant way to empty the cache?

Problem I am having is that if I encounter an error in processing, or I want to start a new clean transaction , but I want to init the cache and make sure it's empty before I start a new transaction, how do I make sure the cache is empty?
If not empty when starting the transaction, how to empty it?

In the previous version I had to drop the connection and re-establish it.
Seems like overkill.
A nice elegant command to empty the cache would work really nicely.

thanks

Johan

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-11-06 09:36:59

No, the only ways to clear the cache is to close the connection or commit the transaction with a known error condition so the transactions fails anyway. The other way would be to batch your tranactions so you can either commit or clear it like this:

BatchStart
sp_batchstart InvoiceLine

BatchInsert1
INSERT INTO "InvoiceLine" ("CustomerRefListID", "RefNumber",
"InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineRate",
"InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", "FQSaveToCache")
VALUES ('AC0000-1197757899', 'Batch1', '250000-933272656', 'Bin Permit Renovations',
200.00000, 200.00, '20000-999022286', 0) 

BatchInsert2
INSERT INTO "InvoiceLine" ("CustomerRefListID", "RefNumber",
"InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineRate",
"InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", "FQSaveToCache")
VALUES ('AC0000-1197757899', 'Batch2', '250000-933272656', 'Bin Permit Renovations',
200.00000, 200.00, '20000-999022286', 0) 

BatchUpdate                                            or      BatchClear
sp_batchupdate  InvoiceLine                        SP_CLEARLASTINSERTID InvoiceLine

See: Are there any special stored procedures that can assist me in programming? for more info.

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to