SOLVED How to get PRAGMA result in query or array lazarus / 16-Databases ---------------------------------------------------------------------- JanRoza · 2023-12-05 23:07 I tried to get the result of an SQLite PRAGMA statement in a query but I must be doing something wrong as the resulting query stays empty. I tried the following: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i qryColumns.Active := false;qryColumns.SQL.Text := 'SELECT name FROM PRAGMA_TABLE_INFO("Temp_Export")';qryColumns.Active := true;  In a SQLite manager (SQLIteExpert) the PRAGMA statement works perfectly, so the syntax is fine. I would also like to know how to get the result of the PRAGMA statement into an array (as alternative for a query). Can anyone get me on the right path? ---------------------------------------------------------------------- JanRoza · 2023-12-06 00:36 It must be the late hour  , but I already found the answer. Solved it by using: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i     strSQL := 'INSERT INTO Temp_Columns SELECT name FROM PRAGMA_TABLE_INFO("Temp_Export")';  DataModule1.DbConnection.ExecuteDirect(strSQL);  DataModule1.DbTransaction.CommitRetaining;  Which gives me a nice table with column names.