Guys am looking how can i optimise my
ID, Name, Description, Created<datetime>, Modified<datetime>
You can do this using the dataset which is connected to the grid.
In the IDE, click on the dataset and go to the Object Inspector Events tab.
BeforePost event, double click in it and enter code like this
if MyDataSet.State = dsInsert then // a new record is being added MyDataSet.FieldByName('Created').AsDateTime := Now; else // modifying an existing record MyDataSet.FieldByName('Modified').AsDateTime := Now;
As noted in a comment, you can populate/update these fields using triggers on the server, but then you have to refresh the data in your Delphi dataset to receive the values in these fields, which is perhaps a bit advanced for where you are at the moment.