Our primary application uses Btrieve, the ISAM version of Pervasive SQL, this allows us to access the same data in either relational or transactional gateways.
We are using the Pervasive as the database for Servoy, and after some trouble with Keys and mismatched data types (SQL_DATE) we have it working pretty well. However I think there may be one more hurdle and that is the freshness of the data being displayed. I understand that both the server and the client cache data and that is okay for the most part, but since most of our data is updated via ISAM, I am not sure we are getting all the adds & updates we should.
I suspect the ISAM nature is the culprit because I don’t have an issue if I perform a stored procedure to refresh the data in the database, only when I am using data that hasn’t been updated via SQL.
Is there a way around this? Can I turn caching off?
I have tried to flush the cache, but that doesn’t seem to have an effect. (see snippet below)
TIA
function flush_cache()
{
var sql = 'SELECT Xf$Name FROM “X$File” where xf$name not like '%$%' ';
var server = ‘ibsi_pervasive’;
var dataset = databaseManager.getDataSetByQuery(server,sql,null,-1);
var recs=dataset.getMaxRowIndex();
for(i=1;i<=recs;i++){
var tablename = utils.stringTrim(dataset.getValue(i,1));
application.output(tablename);
plugins.rawSQL.flushAllClientsCache(‘ibsi_pervasive’, tablename);
}