2014-06-27 15:30:39 +02:00
|
|
|
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,
|
2017-04-24 00:19:53 +02:00
|
|
|
FireDAC.DApt, FireDAC.Comp.DataSet, FireDAC.Phys.FBDef, FireDAC.VCLUI.Wait;
|
2014-06-27 15:30:39 +02:00
|
|
|
|
|
|
|
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
|
2017-05-12 00:25:46 +02:00
|
|
|
// currently, this demo uses firebird 2.5
|
2017-04-29 23:56:56 +02:00
|
|
|
// if you want to use firebird 2.5, you can use the file ORDERSMANAGER_FB25.FDB
|
2017-10-16 22:57:27 +02:00
|
|
|
Connection.Params.Values['Database'] := '..\..\data\ORDERSMANAGER_FB30.FDB';
|
|
|
|
// Connection.Params.Values['Database'] := '..\..\data\ORDERSMANAGER_FB25.FDB';
|
2014-06-27 15:30:39 +02:00
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|