Integration Your Way - (800) 235-7250
RSSBus ADO.NET Provider for QuickBooks V2
Questions / Feedback? Using Cached Data

Using Cached Data

The provider also supports a third caching mode called offline mode, in which all statements are executed against the local cache database and not the real data source. This is enabled by setting the Offline option in the Connection String.

With offline mode, any SELECT statements you execute will always execute on the local cache database, regardless of whether you specify a table_name#Cache table or not. Modification of the cache is disabled in offline mode to prevent accidentally updating only the cached data. Executing a DELETE/UPDATE/INSERT statement while Offline is set will result in an exception.

Queries in offline mode do not have the same syntax limitations as queries run directly against the data source. In offline mode, any SQL query can be executed, including complex JOIN statements between multiple tables in the same database.

Select from the Cached Table


String query = "SELECT * FROM Customers WHERE Name='Cook, Brian' ORDER BY Name ASC";
QuickBooksConnection connection = new QuickBooksConnection("user=myuseraccount;password=mypassword;URL=http://localhost:2080;Offline=true;Query Passthrough=true;");
QuickBooksCommand cmd = new QuickBooksCommand(query, connection);
cmd.ExecuteReader();
Note: The above command will select from the local cache but not the live data source because Offline is set to True.


 
Copyright © 2013 RSSBus Inc.
[x] close

Questions / Feedback?


Name:
Email:
Feedback:
Send Feedback