Sqlite3laz: SQL query result - how can I get it? lazarus / 16-Databases ---------------------------------------------------------------------- ESC · 2007-09-15 06:07 Is it possible, to get result, returned by SQL query, without using visual elements (maybe, as string array?)? And, if it is, how can I do it? ---------------------------------------------------------------------- LuizAmérico · 2007-09-16 23:40 if you want only one field AString := SqliteDataset.QuickQuery('Select Count(*) from MyTable'); if you want more fields Set the OnCallback event and call ExecCallback('MySQL') ---------------------------------------------------------------------- ESC · 2007-09-17 10:16 Thanks, but i don't really understand how to use this: ExecCallback('MySQL'); How the result is returned? As an array? ---------------------------------------------------------------------- LuizAmérico · 2007-09-17 10:27 No. Inside a callback function like the original sqlite api SqliteDataset.OnCallback := @MyCallbackMethod (function (UserData:Pointer; Count:LongInt; Values:PPChar; Names:PPChar):LongInt) SqliteDataset.ExecCallback('Select X,y'); The callback function will be called for each returned record. Count contains the number of columns returned, Values the values of the columns and Names the names of the columns ---------------------------------------------------------------------- ESC · 2007-09-17 11:32 Could you please tell me, where i can read more about this function(s), and how to use them (with code examples)?