ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/examples/ibstoredproc/Unit1.lfm
Revision: 158
Committed: Thu Mar 1 11:23:33 2018 UTC (6 years, 1 month ago) by tony
File size: 5209 byte(s)
Log Message:
Repository resync

File Contents

# User Rev Content
1 tony 158 object Form1: TForm1
2     Left = 777
3     Height = 556
4     Top = 253
5     Width = 656
6     Caption = 'IBStoredProc Demo'
7     ClientHeight = 556
8     ClientWidth = 656
9     DefaultMonitor = dmPrimary
10     OnCreate = FormCreate
11     OnShow = FormShow
12     Position = poDefaultSizeOnly
13     LCLVersion = '1.8.1.0'
14     object Label1: TLabel
15     Left = 26
16     Height = 14
17     Top = 8
18     Width = 77
19     Caption = 'Output Table'
20     ParentColor = False
21     end
22     object IBDynamicGrid1: TIBDynamicGrid
23     Left = 26
24     Height = 145
25     Top = 26
26     Width = 606
27     Anchors = [akTop, akLeft, akRight]
28     Color = clWindow
29     Columns = <
30     item
31     Title.Alignment = taCenter
32     Title.Caption = 'Line No.'
33     Width = 100
34     FieldName = 'LINE_NUM'
35     AutoSizeColumn = False
36     InitialSortColumn = False
37     DBLookupProperties.ItemHeight = 0
38     DBLookupProperties.ItemWidth = 0
39     DBLookupProperties.AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
40     end
41     item
42     Title.Alignment = taCenter
43     Title.Caption = 'Content'
44     Width = 150
45     FieldName = 'CONTENT'
46     AutoSizeColumn = True
47     InitialSortColumn = False
48     DBLookupProperties.ItemHeight = 0
49     DBLookupProperties.ItemWidth = 0
50     DBLookupProperties.AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
51     end>
52     DataSource = DataSource1
53     Scrollbars = ssAutoVertical
54     TabOrder = 0
55     ExpandEditorPanelBelowRow = False
56     Descending = False
57     EditorBorderStyle = bsSingle
58     DefaultPositionAtEnd = False
59     end
60     object Label2: TLabel
61     Left = 26
62     Height = 14
63     Top = 176
64     Width = 31
65     Caption = 'Lines'
66     ParentColor = False
67     end
68     object Memo1: TMemo
69     Left = 26
70     Height = 120
71     Top = 192
72     Width = 598
73     Anchors = [akTop, akLeft, akRight]
74     Lines.Strings = (
75     'Memo1'
76     )
77     ScrollBars = ssAutoBoth
78     TabOrder = 1
79     end
80     object Button1: TButton
81     Left = 520
82     Height = 28
83     Top = 351
84     Width = 107
85     Anchors = [akTop, akRight]
86     Caption = 'Populate Table'
87     OnClick = Button1Click
88     TabOrder = 2
89     end
90     object GetLinesBtn: TButton
91     Left = 520
92     Height = 28
93     Top = 390
94     Width = 107
95     Anchors = [akTop, akRight]
96     Caption = 'Get Lines'
97     OnClick = GetLinesBtnClick
98     TabOrder = 3
99     end
100     object Label3: TLabel
101     Left = 35
102     Height = 231
103     Top = 319
104     Width = 477
105     Anchors = [akTop, akLeft, akRight, akBottom]
106     AutoSize = False
107     Caption = 'This demonstrates the use of TIBStoredProc with the Firebird 3 packages example provided with the Firebird 3 source code. A database is created in a temporary location when the application is first run. Once this completes, click on "Populate Table". This uses IBStoredProc2 to call the global stored procedure "test", which populates the temporary table displayed above.'#10#10'Now click on Get Lines. This uses IBStoredProc1 to call the GET_LINES procedure in the FB$OUT package. It returns a text blob which is then shown in the TMemo control.'#10#10'After the database has been created you can inspect the TIBStoredProc properties. '
108     ParentColor = False
109     WordWrap = True
110     end
111     object IBDatabase1: TIBDatabase
112     Connected = False
113     CreateIfNotExists = True
114     AllowStreamedConnected = False
115     DatabaseName = '$DATADIR$sptest.fdb'
116     Params.Strings = (
117     'user_name=SYSDBA'
118     )
119     DefaultTransaction = IBTransaction1
120     IdleTimer = 0
121     TraceFlags = []
122     UseDefaultSystemCodePage = False
123     OnCreateDatabase = IBDatabase1CreateDatabase
124     left = 130
125     top = 65
126     end
127     object IBTransaction1: TIBTransaction
128     Active = False
129     DefaultDatabase = IBDatabase1
130     left = 240
131     top = 65
132     end
133     object IBStoredProc1: TIBStoredProc
134     AllowAutoActivateTransaction = False
135     Database = IBDatabase1
136     Transaction = IBTransaction1
137     PackageName = 'FB$OUT'
138     StoredProcName = 'GET_LINES'
139     Params = <
140     item
141     DataType = ftBlob
142     Name = 'LINES'
143     ParamType = ptOutput
144     end>
145     left = 454
146     top = 68
147     ParamData = <
148     item
149     DataType = ftBlob
150     Name = 'LINES'
151     ParamType = ptOutput
152     end>
153     end
154     object IBStoredProc2: TIBStoredProc
155     AllowAutoActivateTransaction = False
156     Database = IBDatabase1
157     Transaction = IBTransaction1
158     StoredProcName = 'TEST'
159     Params = <>
160     left = 551
161     top = 70
162     end
163     object IBQuery1: TIBQuery
164     AllowAutoActivateTransaction = False
165     Database = IBDatabase1
166     Transaction = IBTransaction1
167     BufferChunks = 1000
168     CachedUpdates = False
169     GenerateParamNames = False
170     GeneratorField.ApplyOnEvent = gaeOnNewRecord
171     SQL.Strings = (
172     'Select A.LINE_NUM, A.CONTENT From FB$OUT_TABLE A'
173     )
174     Params = <>
175     DataSetCloseAction = dcDiscardChanges
176     left = 133
177     top = 128
178     end
179     object DataSource1: TDataSource
180     DataSet = IBQuery1
181     left = 56
182     top = 129
183     end
184     object ApplicationProperties1: TApplicationProperties
185     OnIdle = ApplicationProperties1Idle
186     left = 239
187     top = 131
188     end
189     object IBDatabaseInfo1: TIBDatabaseInfo
190     Database = IBDatabase1
191     left = 368
192     top = 130
193     end
194     end