Topic: Delete All Rows...then Auto Query
i want to delete all rows in table (not the table). From a Button I use the Action, 'SQL Query', "Delete FROM userAnswers";
if i select the 2 table options below i get this error (see attachment).
i also get the same errors if i run it directly from a Script.
form1.tablegrid2.dbSQL := 'Delete From userAnswers';
form1.tablegrid2.dbSQLExecute;
If i leave these 2 options blank, no error and the data rows ARE deleted from db Table... BUT the TableGrid2 component doesnt run the Auto Query
even though the db Table doesnt have data, I still want to Column Names to appear in my TableGrid.
i did OnClick precedure from the same Button and ran
if Form1.TableGrid2.dbSQL <> '' then Form1.TableGrid2.dbSQLExecute;
but still same result, doesnt auto update
what the best solution? thanks