mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-18 01:05:54 +01:00
0b6df41668
New sample: articles_crud
36 lines
894 B
ObjectPascal
36 lines
894 B
ObjectPascal
unit MainDM;
|
|
|
|
interface
|
|
|
|
uses
|
|
System.SysUtils, System.Classes, FireDAC.Stan.Intf, FireDAC.Stan.Option,
|
|
FireDAC.Stan.Error, FireDAC.UI.Intf, FireDAC.Phys.Intf, FireDAC.Stan.Def,
|
|
FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.Phys.FB, Data.DB,
|
|
FireDAC.Comp.Client, FireDAC.Stan.Param, FireDAC.DatS, FireDAC.DApt.Intf,
|
|
FireDAC.DApt, FireDAC.Comp.DataSet;
|
|
|
|
type
|
|
TdmMain = class(TDataModule)
|
|
Connection: TFDConnection;
|
|
dsArticles: TFDQuery;
|
|
updArticles: TFDUpdateSQL;
|
|
procedure ConnectionBeforeConnect(Sender: TObject);
|
|
private
|
|
{ Private declarations }
|
|
public
|
|
{ Public declarations }
|
|
end;
|
|
|
|
implementation
|
|
|
|
{%CLASSGROUP 'Vcl.Controls.TControl'}
|
|
|
|
{$R *.dfm}
|
|
|
|
procedure TdmMain.ConnectionBeforeConnect(Sender: TObject);
|
|
begin
|
|
Connection.Params.Values['Database'] := '..\..\data\ORDERSMANAGER.FDB';
|
|
end;
|
|
|
|
end.
|