Columns Count in querry result lazarus / 16-Databases ---------------------------------------------------------------------- Middlecope · 2024-03-22 15:25 openSUSE,  SQLite3 How to determine the count of columns in a querry result set? I found this in https://sqlite.org/c3ref/column_count.html Quoteint sqlite3_column_count(sqlite3_stmt *pStmt);Unfortunately no instructions how to use it ---------------------------------------------------------------------- rvk · 2024-03-22 15:28 Just read out the field count from your dataset. If TSQLQuery then TSQLQuery.Fieldcount. You can access them via TSQLQuery.Field array. ---------------------------------------------------------------------- Handoko · 2024-03-22 15:42 This works for me: 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   Query.SQL.Text := 'SELECT COUNT(*) FROM tblData;';  Query.Open;  TotalRows   := Query.Fields[0].AsInteger;     TotalFields := Query.FieldCount; ---------------------------------------------------------------------- Middlecope · 2024-03-22 15:51 Thanks I was to fixed on the word Column that I forget to look at Field, Sory