unit DataModule;

interface

uses
  SysUtils, Classes, DB, ADODB, SqlExpr, FMTBcd, DBClient, WideStrings;

type
  TDM = class(TDataModule)
    SQLDataSet: TSQLDataSet;
    SQLDataSetINSERT: TSQLDataSet;
    SQLDataSetEDIT: TSQLDataSet;
    SQLDataSetDELETE: TSQLDataSet;
    SQLConnection: TSQLConnection;
    procedure DataModuleCreate(Sender: TObject);
    procedure DataModuleDestroy(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  DM: TDM;

implementation

{$R *.dfm}

procedure TDM.DataModuleCreate(Sender: TObject);
begin
   SQLConnection.Connected := True;
end;

procedure TDM.DataModuleDestroy(Sender: TObject);
begin
   SQLDataSet.Active       := False;
   SQLConnection.Connected := False;
end;

end.

