ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/examples/scriptengine/unit2.pas
Revision: 37
Committed: Mon Feb 15 14:44:25 2016 UTC (8 years, 9 months ago) by tony
Content type: text/x-pascal
File size: 1079 byte(s)
Log Message:
Committing updates for Release R1-4-0

File Contents

# User Rev Content
1 tony 37 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