I'm new using ZeosLib... and re-learning Delphi; I'm taking it after 6 year; previously I was using dbExpress drivers. I have Delphi 7 connected to mySQL 5.
Using dbExpress, to delete a selected recrod on a dbgrid, I used to have:
Code: Select all
DataSource.DataSet.Delete;
if TClientDataSet( DataSource.DataSet ).ApplyUpdates(0) > 0 then
TClientDataSet( DataSource.DataSet ).CancelUpdates;
Code: Select all
try
DataSource.DataSet.Delete;
TZQuery( DataSource.DataSet ).ApplyUpdates;
Except on e:Exception do
begin
MessageDlg(e.Message, mtError, [mbOK], 0);
TZQuery( DataSource.DataSet ).CancelUpdates;
end;
Am I missing something here?
Thank you