Finding Required Fields in a dataset

From: Bill N (bnielsen_at_cpumanagement.com)
Date: 10/22/04

  • Next message: dfagnan: "Re: ADO and EOleException"
    Date: 22 Oct 2004 12:37:18 -0700
    
    

    I'm always writing code in the BeforePost event of my TADODataset that
    is something like:
    ====================================================================
    If MyDataset.FieldByName('SomeField').asString = '' then
    begin
      raise ETypo.Create('Some Field has a missing blahblah');
      Abort;
    End;
    ====================================================================
    I'm thinking I would like to write some generic error handler that
    would:

    1) Determine what Dataset has the required field empty (missing)
    2) Which field is missing.
    3) Display the error message.

    Is there a way to do this? Any ideas?

    Thanks,
    Bill N


  • Next message: dfagnan: "Re: ADO and EOleException"
  • Quantcast