ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/examples/arrays/1Darray/Unit1.lfm
Revision: 68
Committed: Tue Oct 17 10:07:58 2017 UTC (6 years, 6 months ago) by tony
File size: 6362 byte(s)
Log Message:
IBX: Editor Positioning tidy up
FBINTF: Trap uninitialised SQL parameters on SQL Exec. Avoids Unknown SQL Type errors.
Consistent setting of Modified (SQLParam).

File Contents

# Content
1 object Form1: TForm1
2 Left = 1767
3 Height = 620
4 Top = 267
5 Width = 882
6 Caption = '1D Array Example'
7 ClientHeight = 620
8 ClientWidth = 882
9 DefaultMonitor = dmPrimary
10 OnCreate = FormCreate
11 OnShow = FormShow
12 LCLVersion = '1.8.0.4'
13 object DBControlGrid1: TDBControlGrid
14 Left = 20
15 Height = 543
16 Top = 32
17 Width = 833
18 AlternateColor = 16640469
19 AltColorStartNormal = True
20 Anchors = [akTop, akLeft, akRight, akBottom]
21 Color = clWindow
22 DataSource = DataSource1
23 DefaultPositionAtEnd = False
24 DrawPanel = Panel1
25 Options = [dgpIndicator]
26 TabOrder = 0
27 ColWidths = (
28 12
29 819
30 )
31 object Panel1: TPanel
32 Left = 12
33 Height = 96
34 Top = 0
35 Width = 819
36 ClientHeight = 96
37 ClientWidth = 819
38 TabOrder = 0
39 object DBEdit1: TDBEdit
40 Left = 8
41 Height = 24
42 Top = 32
43 Width = 264
44 DataField = 'TITLE'
45 DataSource = DataSource1
46 CharCase = ecNormal
47 MaxLength = 0
48 TabOrder = 0
49 end
50 object Label1: TLabel
51 Left = 8
52 Height = 14
53 Top = 16
54 Width = 73
55 Caption = 'Department'
56 ParentColor = False
57 end
58 object Label2: TLabel
59 Left = 296
60 Height = 14
61 Top = 16
62 Width = 67
63 Caption = 'Sales Value'
64 ParentColor = False
65 end
66 object Panel2: TPanel
67 Left = 297
68 Height = 44
69 Top = 30
70 Width = 496
71 BevelOuter = bvNone
72 Caption = 'If you can see this, goto http://bugs.freepascal.org/view.php?id=30892'
73 ClientHeight = 44
74 ClientWidth = 496
75 TabOrder = 1
76 object IBArrayGrid1: TIBArrayGrid
77 Left = 0
78 Height = 44
79 Top = 0
80 Width = 496
81 DataField = 'MYARRAY'
82 DataSource = DataSource1
83 ColumnLabels.Strings = (
84 'Jan'
85 'Feb'
86 'Mar'
87 'Apr'
88 'May'
89 'Jun'
90 'Jul'
91 'Aug'
92 'Sep'
93 'Oct'
94 'Nov'
95 'Dec'
96 )
97 ColumnLabelFont.Height = -13
98 ColumnLabelFont.Name = 'Sans'
99 ColumnLabelFont.Style = [fsBold]
100 RowLabelColumnWidth = 64
101 TextAlignment = taRightJustify
102 Align = alClient
103 AutoFillColumns = True
104 FixedColor = clHighlightText
105 Options = [goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goSmoothScroll]
106 ScrollBars = ssNone
107 TabOrder = 0
108 ColCount = 12
109 RowCount = 18
110 ColWidths = (
111 41
112 41
113 41
114 41
115 41
116 41
117 41
118 41
119 41
120 41
121 41
122 43
123 )
124 end
125 end
126 end
127 end
128 object SaveBtn: TButton
129 Left = 776
130 Height = 30
131 Top = 584
132 Width = 75
133 Anchors = [akRight, akBottom]
134 Caption = 'Save'
135 OnClick = SaveBtnClick
136 TabOrder = 1
137 end
138 object CancelBtn: TButton
139 Left = 696
140 Height = 30
141 Top = 584
142 Width = 75
143 Anchors = [akRight, akBottom]
144 Caption = 'Cancel'
145 OnClick = CancelBtnClick
146 TabOrder = 2
147 end
148 object Button1: TButton
149 Left = 21
150 Height = 30
151 Top = 584
152 Width = 75
153 Anchors = [akLeft, akBottom]
154 Caption = 'Insert'
155 OnClick = Button1Click
156 TabOrder = 3
157 end
158 object Button2: TButton
159 Left = 104
160 Height = 30
161 Top = 584
162 Width = 75
163 Anchors = [akLeft, akBottom]
164 Caption = 'Delete'
165 OnClick = Button2Click
166 TabOrder = 4
167 end
168 object IBDatabase1: TIBDatabase
169 Connected = False
170 AfterConnect = IBDatabase1AfterConnect
171 CreateIfNotExists = True
172 AllowStreamedConnected = False
173 DatabaseName = '/tmp/1Dtest.fdb'
174 Params.Strings = (
175 'user_name=SYSDBA'
176 'lc_ctype=UTF8'
177 )
178 DefaultTransaction = IBTransaction1
179 IdleTimer = 0
180 TraceFlags = []
181 UseDefaultSystemCodePage = False
182 OnCreateDatabase = IBDatabase1CreateDatabase
183 left = 283
184 top = 244
185 end
186 object IBTransaction1: TIBTransaction
187 Active = False
188 DefaultDatabase = IBDatabase1
189 AfterTransactionEnd = IBTransaction1AfterTransactionEnd
190 left = 327
191 top = 244
192 end
193 object IBDataSet1: TIBDataSet
194 AllowAutoActivateTransaction = True
195 Database = IBDatabase1
196 Transaction = IBTransaction1
197 AfterDelete = IBDataSet1AfterEdit
198 AfterEdit = IBDataSet1AfterEdit
199 AfterInsert = IBDataSet1AfterEdit
200 AfterOpen = IBDataSet1AfterOpen
201 BufferChunks = 1000
202 CachedUpdates = False
203 DeleteSQL.Strings = (
204 'Delete From TESTDATA A'
205 'Where A.ROWID = :ROWID'
206 )
207 InsertSQL.Strings = (
208 'Insert Into TESTDATA(ROWID, TITLE, MYARRAY)'
209 'Values(:ROWID, :TITLE, :MYARRAY)'
210 )
211 RefreshSQL.Strings = (
212 'Select A.ROWID, A.TITLE, A.MYARRAY From TESTDATA A'
213 'Where A.ROWID = :ROWID'
214 )
215 SelectSQL.Strings = (
216 'Select A.ROWID, A.TITLE, A.MYARRAY From TESTDATA A'
217 'order by 1 asc'
218 )
219 ModifySQL.Strings = (
220 'Update TESTDATA A Set '
221 ' A.ROWID = :ROWID,'
222 ' A.TITLE = :TITLE,'
223 ' A.MYARRAY = :MYARRAY'
224 'Where A.ROWID = :OLD_ROWID'
225 )
226 GeneratorField.Generator = 'ROWNUMBER'
227 GeneratorField.Field = 'ROWID'
228 GeneratorField.ApplyOnEvent = gaeOnNewRecord
229 GenerateParamNames = False
230 DataSetCloseAction = dcSaveChanges
231 left = 408
232 top = 244
233 object IBDataSet1ROWID: TIntegerField
234 FieldKind = fkData
235 FieldName = 'ROWID'
236 Index = 0
237 LookupCache = False
238 ProviderFlags = [pfInUpdate, pfInWhere]
239 ReadOnly = False
240 Required = True
241 end
242 object IBDataSet1TITLE: TIBStringField
243 FieldKind = fkData
244 FieldName = 'TITLE'
245 Index = 1
246 LookupCache = False
247 ProviderFlags = [pfInUpdate, pfInWhere]
248 ReadOnly = False
249 Required = False
250 Size = 32
251 end
252 object IBDataSet1MYARRAY: TIBArrayField
253 FieldKind = fkData
254 FieldName = 'MYARRAY'
255 Index = 2
256 LookupCache = False
257 ProviderFlags = [pfInUpdate, pfInWhere]
258 ReadOnly = False
259 Required = False
260 end
261 end
262 object DataSource1: TDataSource
263 DataSet = IBDataSet1
264 left = 368
265 top = 244
266 end
267 end