milosev.com
  • Home
    • List all categories
    • Sitemap
  • Downloads
    • WebSphere
    • Hitachi902
    • Hospital
    • Kryptonite
    • OCR
    • APK
  • About me
    • Gallery
      • Italy2022
    • Curriculum vitae
      • Resume
      • Lebenslauf
    • Social networks
      • Facebook
      • Twitter
      • LinkedIn
      • Xing
      • GitHub
      • Google Maps
      • Sports tracker
    • Adventures planning
  1. You are here:  
  2. Home
  3. Delphi
  4. dbExpress

Exception handling

Details
Written by: Stanko Milosev
Category: dbExpress
Published: 08 August 2008
Last Updated: 25 January 2010
Hits: 5812

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;

Page 2 of 2

  • 1
  • 2