Facebookov profil osebe Stanko Milosev


Exception handling PDF  | Print |  E-mail
Friday, 08 August 2008 07:51

Problem with dbExpress is that it does not raise an exception if anything is wrong in database (for example, if you try to add primary key which already exist). So, to get an exception, best would be to use OnReconcileError in TClientDataSet... Small example:

 

 procedure Tdm.cdsReconcileError(DataSet: TCustomClientDataSet;
  E: EReconcileError; UpdateKind: TUpdateKind; var Action: TReconcileAction);
begin
  ShowMessage(e.Message);
end;

Last Updated on Monday, 25 January 2010 19:41