Integration Your Way - (800) 235-7250
RSSBus ADO.NET Provider for Google Spreadsheets
Questions / Feedback? Caching Explicitly

Caching Explicitly

With explicit caching (Auto Cache=false), you decide exactly what data gets stored in the cache and when it is updated. Explicit caching gives you full control over the cache contents by using explicit execution of CACHE statements.

To load data in the cache, simply execute a "CACHE table_name WHERE ..." statement and any matching data in table_name will be loaded into the corresponding table_name table.

Create or Update the Cached Table Explicitly

C#

GoogleSheetsCommand cmd = new GoogleSheetsCommand("CACHE MySpreadsheet", connection);
cmd.ExecuteNonQuery();
connection.Close();

VB.NET

Dim cmd As GoogleSheetsCommand = New GoogleSheetsCommand("CACHE MySpreadsheet", connection)
cmd.ExecuteNonQuery()
connection.Close()
Note: The above command will update modified rows and add missing rows in the cached table. However, it will not delete extra rows that are already in the cache.

Update Cached Table to Contain Only the Live Data

C#

GoogleSheetsCommand cmd = new GoogleSheetsCommand("CACHE MySpreadsheet WITH TRUNCATE", connection);
cmd.ExecuteNonQuery();
connection.Close();

VB.NET

Dim GoogleSheetsCommand As cmd = New GoogleSheetsCommand("CACHE MySpreadsheet WITH TRUNCATE", connection)
cmd.ExecuteNonQuery()
connection.Close()
Note: The above command will delete rows in the cache table that are not present in the live data source.


 
Copyright © 2013 RSSBus Inc.
[x] close

Questions / Feedback?


Name:
Email:
Feedback:
Send Feedback