1 |
unit Unit2; |
2 |
|
3 |
{$mode objfpc}{$H+} |
4 |
|
5 |
interface |
6 |
|
7 |
uses |
8 |
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, db, |
9 |
IBDynamicGrid, IBQuery, IBDatabase; |
10 |
|
11 |
type |
12 |
|
13 |
{ TSelectSQLResults } |
14 |
|
15 |
TSelectSQLResults = class(TForm) |
16 |
DataSource1: TDataSource; |
17 |
IBDynamicGrid1: TIBDynamicGrid; |
18 |
IBTransaction1: TIBTransaction; |
19 |
SelectQuery: TIBQuery; |
20 |
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); |
21 |
procedure FormShow(Sender: TObject); |
22 |
private |
23 |
{ private declarations } |
24 |
public |
25 |
{ public declarations } |
26 |
procedure Show(SelectSQLText: string); |
27 |
end; |
28 |
|
29 |
var |
30 |
SelectSQLResults: TSelectSQLResults; |
31 |
|
32 |
implementation |
33 |
|
34 |
{$R *.lfm} |
35 |
|
36 |
{ TSelectSQLResults } |
37 |
|
38 |
procedure TSelectSQLResults.FormShow(Sender: TObject); |
39 |
begin |
40 |
SelectQuery.Active := true; |
41 |
end; |
42 |
|
43 |
procedure TSelectSQLResults.FormClose(Sender: TObject; |
44 |
var CloseAction: TCloseAction); |
45 |
begin |
46 |
SelectQuery.ACtive := false; |
47 |
CloseAction := caFree; |
48 |
end; |
49 |
|
50 |
procedure TSelectSQLResults.Show(SelectSQLText: string); |
51 |
begin |
52 |
SelectQuery.SQL.Text := SelectSQLText; |
53 |
inherited Show; |
54 |
end; |
55 |
|
56 |
end. |
57 |
|