home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / borland / cb / setup / cbuilder / data.z / DM1.H < prev    next >
C/C++ Source or Header  |  1997-02-28  |  3KB  |  66 lines

  1. //----------------------------------------------------------------------------
  2. //Borland C++Builder
  3. //Copyright (c) 1987, 1997 Borland International Inc. All Rights Reserved.
  4. //----------------------------------------------------------------------------
  5. //---------------------------------------------------------------------------
  6. #ifndef DM1H
  7. #define DM1H
  8. //---------------------------------------------------------------------------
  9. #include <vcl\Classes.hpp>
  10. #include <vcl\Controls.hpp>
  11. #include <vcl\StdCtrls.hpp>
  12. #include <vcl\Forms.hpp>
  13. #include <vcl\DBTables.hpp>
  14. #include <vcl\DB.hpp>
  15. //---------------------------------------------------------------------------
  16.  
  17. // Declare constants we're interested in.
  18. //
  19. const int eKeyViol = 9729;
  20. const int eRequiredFieldMissing = 9732;
  21. const int eForeignKey = 9733;
  22. const int eDetailsExist = 9734;
  23.  
  24. class TDM : public TDataModule
  25. {
  26. __published:    // IDE-managed Components 
  27.         TTable *Customer;
  28.         TFloatField *CustomerCustNo;
  29.         TStringField *CustomerCompany;
  30.         TDataSource *CustomerSource;
  31.         TTable *Orders;
  32.         TFloatField *OrdersOrderNo;
  33.         TFloatField *OrdersCustNo;
  34.         TDateTimeField *OrdersSaleDate;
  35.         TDateTimeField *OrdersShipDate;
  36.         TIntegerField *OrdersEmpNo;
  37.         TDataSource *OrdersSource;
  38.         TTable *Items;
  39.         TFloatField *ItemsOrderNo;
  40.         TFloatField *ItemsItemNo;
  41.         TFloatField *ItemsPartNo;
  42.         TIntegerField *ItemsQty;
  43.         TFloatField *ItemsDiscount;
  44.         TDataSource *ItemsSource;
  45.         void __fastcall CustomerPostError(TDataSet *DataSet,
  46.            EDatabaseError *E, TDataAction &Action);
  47.         void __fastcall CustomerDeleteError(TDataSet *DataSet,
  48.       EDatabaseError *E, TDataAction &Action);
  49.         void __fastcall CustomerCustNoChange(TField *Sender);
  50.         void __fastcall CustomerAfterPost(TDataSet *DataSet);
  51.         
  52.         void __fastcall OrdersPostError(TDataSet *DataSet,
  53.       EDatabaseError *E, TDataAction &Action);
  54.         void __fastcall ItemsPostError(TDataSet *DataSet,
  55.       EDatabaseError *E, TDataAction &Action);
  56.         void __fastcall OrdersDeleteError(TDataSet *DataSet,
  57.       EDatabaseError *E, TDataAction &Action);
  58. private:    // User declarations
  59. public:        // User declarations
  60.         virtual __fastcall TDM(TComponent* Owner);
  61. };
  62. //---------------------------------------------------------------------------
  63. extern TDM *DM;
  64. //---------------------------------------------------------------------------
  65. #endif
  66.