SQL Select Count lazarus / 16-Databases ---------------------------------------------------------------------- Deepaak · 2017-10-22 14:56 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(Number) From Table1';Query.ExecuteSql Error Project Project1 raise exception. What's Wrong. ---------------------------------------------------------------------- goodname · 2017-10-22 15:24 First you could try putting it is a try exception block and seeing what error is thrown. Second select statements return data and should use Query.Open; to open a data set. ---------------------------------------------------------------------- taazz · 2017-10-22 15:31 select commands must always be opened not executed.