unit DataModule;

interface

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

type
  TDM = class(TDataModule)
    ds: TDataSource;
    SQLConnection: TSQLConnection;
    SQLDataSet: TSQLDataSet;
    DataSetProvider: TDataSetProvider;
    ClientDataSet: TClientDataSet;
    ClientDataSetidosoby: TIntegerField;
    ClientDataSetnazwisko: TStringField;
    ClientDataSetimie: TStringField;
    ClientDataSetdataur: TDateField;
    ClientDataSetmcowosc: TStringField;
    ClientDataSetulicainr: TStringField;
    ClientDataSetkodp: TStringField;
    ClientDataSetmiasto: TStringField;
    ClientDataSetpesel: TStringField;
    SQLDataSetInsert: TSQLDataSet;
    SQLDataSetEdit: TSQLDataSet;
    SQLDataSetDelete: TSQLDataSet;
    procedure DataModuleCreate(Sender: TObject);
    procedure DataModuleDestroy(Sender: TObject);
  private

  public

  end;

var
  DM: TDM;

implementation
{$R *.dfm}
{------------------------------------------------------------------------------}
procedure TDM.DataModuleCreate(Sender: TObject);
begin
   SQLDataSet.Close();
   ClientDataSet.Close();
	SQLConnection.Close();

   SQLConnection.Open();
end;

procedure TDM.DataModuleDestroy(Sender: TObject);
begin
   SQLDataSet.Close();
   ClientDataSet.Close();
	SQLConnection.Close();
end;


end.
