dbf boolean atribute take as integer

Hello,
I am working on a solution which have its data on dbf tables.
There is a table with a colum of boolean type. Servoy recognized this colum as integer not as boolean.
When i perform a search by this column:

var query = “select * from granexam where es_histori = ?”
var args = new Array()
args[0]= ‘true’
var dataset = databaseManager.getDataSetByQuery(“pruebadbf”,query,args,100)
foundset.loadRecords(dataset)

the data i obtain is not correct. They are all true, but there are others true and they did not appear in the foundset.
thanks in advantage for your help!

Hi,

You seem to limit your resultset to 100 records. If you want to get all records that you find then use -1.
So your code would look like this:

var query = "SELECT * FROM granexam WHERE es_histori = ?";
var args =['true'];
var dataset = databaseManager.getDataSetByQuery("pruebadbf",query,args,-1);
foundset.loadRecords(dataset);

Also you can pass the SQL straight into the controller so you don’t have to use a dataset like so:

var query = "SELECT idColumn FROM granexam WHERE es_histori = ?";
var args =['true'];
foundset.loadRecords(query,args);

Hope this helps.

thank you!!