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. |