AutoCalcFields / Getting field values using Lazarus function lazarus / 16-Databases ---------------------------------------------------------------------- Zomis · 2007-02-10 11:56 I see that the TDataSet class has an AutoCalcFields property. But I have no idea if it works or not, or how to use it. I want to use a Select-SQL Query which uses a field named "realcount" which is defined using a Delphi function. The Delphi function needs a "filename" field from the SQL Query, and then the Delphi function returns "realcount" to the SQL Query. So for example, this table Code: [Select] filename       count        somedata 'test1.txt'      5       'just some data' 'test2.txt'      7       'another piece of data' Using the SQL-query "select filename, count, realcount from mytable" I want a Delphi function to open the file named filename, and scan that file to check the "realcount" value which will be returned in the SQL- query. Is there somehow to do this using any kind of Database? (I'm using SQLite right now, but I'm open for changes) ---------------------------------------------------------------------- Zomis · 2007-02-14 11:25 Sorry for putting "Delphi procedure" in the topic. Of course I meant "Lazarus function" And I have another idea about how this can be done, using custom SQL- functions Something like SELECT filename,count,MyFunc(filename) FROM mytable Is there any Databases which supports custom SQL-functions?