The code below is used when someone focus on a TreeList and chooses the popup menu 'Delete'.
//Grabs the ID of the selected row
if Assigned(cxTasks.FocusedNode) then
LId := cxTasks.FocusedNode.Texts[cxTasksID.ItemIndex];
//Attempts to delete that row
Query := TADOQuery.Create(nil);
Query.Connection := conSql;
Query.SQL.Add('Select * FROM Tasks WHERE id='+LId);
Query.Active := True;
Query.Active := False;
//Query.SQL.Add('DELETE FROM Tasks WHERE id='+LId);
However, when I run the code I get this error message:
Any idea what's wrong here?