mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-16 08:15:53 +01:00
a4381ec719
Added milligram.css to some samples
57 lines
1.3 KiB
ObjectPascal
57 lines
1.3 KiB
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,
|
|
FireDAC.Phys.FBDef,
|
|
FireDAC.VCLUI.Wait;
|
|
|
|
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
|
|
{$IFNDEF WINDOWSSERVICE}
|
|
// if you want to use firebird 2.5, you can use the file ORDERSMANAGER_FB25.FDB
|
|
Connection.Params.Values['Database'] := '..\..\data\ORDERSMANAGER_FB30.FDB';
|
|
// Connection.Params.Values['Database'] := '..\..\data\ORDERSMANAGER_FB25.FDB';
|
|
{$ELSE}
|
|
Connection.Params.Values['Database'] := 'C:\DEV\dmvcframework\samples\data\ORDERSMANAGER_FB30.FDB';
|
|
{$ENDIF}
|
|
end;
|
|
|
|
end.
|