1 |
|
object Form1: TForm1 |
2 |
< |
Left = 711 |
2 |
> |
Left = 616 |
3 |
|
Height = 329 |
4 |
|
Top = 256 |
5 |
|
Width = 658 |
6 |
|
Caption = 'IBLookup Combo Box Demo' |
7 |
|
ClientHeight = 329 |
8 |
|
ClientWidth = 658 |
9 |
+ |
DefaultMonitor = dmPrimary |
10 |
|
OnClose = FormClose |
11 |
|
OnShow = FormShow |
12 |
< |
LCLVersion = '1.4.0.3' |
12 |
> |
Position = poScreenCenter |
13 |
> |
LCLVersion = '1.8.0.4' |
14 |
|
object Label1: TLabel |
15 |
|
Left = 16 |
16 |
< |
Height = 15 |
16 |
> |
Height = 14 |
17 |
|
Top = 16 |
18 |
|
Width = 98 |
19 |
|
Caption = 'Employee Name' |
39 |
|
end |
40 |
|
object Label2: TLabel |
41 |
|
Left = 16 |
42 |
< |
Height = 15 |
42 |
> |
Height = 14 |
43 |
|
Top = 79 |
44 |
|
Width = 103 |
45 |
|
Caption = 'Employee Details' |
58 |
|
TabOrder = 1 |
59 |
|
object Label3: TLabel |
60 |
|
Left = 14 |
61 |
< |
Height = 15 |
61 |
> |
Height = 14 |
62 |
|
Top = 18 |
63 |
|
Width = 64 |
64 |
|
Caption = 'First Name' |
66 |
|
end |
67 |
|
object DBEdit1: TDBEdit |
68 |
|
Left = 14 |
69 |
< |
Height = 25 |
69 |
> |
Height = 24 |
70 |
|
Top = 32 |
71 |
|
Width = 136 |
72 |
|
DataField = 'FIRST_NAME' |
77 |
|
end |
78 |
|
object Label4: TLabel |
79 |
|
Left = 168 |
80 |
< |
Height = 15 |
80 |
> |
Height = 14 |
81 |
|
Top = 18 |
82 |
|
Width = 64 |
83 |
|
Caption = 'Last Name' |
85 |
|
end |
86 |
|
object DBEdit2: TDBEdit |
87 |
|
Left = 168 |
88 |
< |
Height = 25 |
88 |
> |
Height = 24 |
89 |
|
Top = 32 |
90 |
|
Width = 144 |
91 |
|
DataField = 'LAST_NAME' |
96 |
|
end |
97 |
|
object Label5: TLabel |
98 |
|
Left = 547 |
99 |
< |
Height = 15 |
99 |
> |
Height = 14 |
100 |
|
Top = 120 |
101 |
|
Width = 24 |
102 |
|
Anchors = [akTop, akRight] |
105 |
|
end |
106 |
|
object DBEdit3: TDBEdit |
107 |
|
Left = 547 |
108 |
< |
Height = 25 |
108 |
> |
Height = 24 |
109 |
|
Top = 136 |
110 |
|
Width = 48 |
111 |
|
DataField = 'PHONE_EXT' |
117 |
|
end |
118 |
|
object Label6: TLabel |
119 |
|
Left = 16 |
120 |
< |
Height = 15 |
120 |
> |
Height = 14 |
121 |
|
Top = 65 |
122 |
|
Width = 56 |
123 |
|
Caption = 'Hire Date' |
125 |
|
end |
126 |
|
object Label7: TLabel |
127 |
|
Left = 172 |
128 |
< |
Height = 15 |
128 |
> |
Height = 14 |
129 |
|
Top = 65 |
130 |
|
Width = 37 |
131 |
|
Caption = 'Salary' |
133 |
|
end |
134 |
|
object DBEdit4: TDBEdit |
135 |
|
Left = 168 |
136 |
< |
Height = 25 |
136 |
> |
Height = 24 |
137 |
|
Top = 80 |
138 |
|
Width = 144 |
139 |
|
DataField = 'SALARY' |
144 |
|
end |
145 |
|
object Label8: TLabel |
146 |
|
Left = 392 |
147 |
< |
Height = 15 |
147 |
> |
Height = 14 |
148 |
|
Top = 16 |
149 |
|
Width = 51 |
150 |
|
Caption = 'Location' |
152 |
|
end |
153 |
|
object Label9: TLabel |
154 |
|
Left = 331 |
155 |
< |
Height = 15 |
155 |
> |
Height = 14 |
156 |
|
Top = 16 |
157 |
|
Width = 36 |
158 |
|
Caption = 'Grade' |
160 |
|
end |
161 |
|
object DBComboBox1: TDBComboBox |
162 |
|
Left = 331 |
163 |
< |
Height = 29 |
163 |
> |
Height = 25 |
164 |
|
Top = 32 |
165 |
|
Width = 53 |
166 |
|
DataField = 'JOB_GRADE' |
180 |
|
end |
181 |
|
object Label10: TLabel |
182 |
|
Left = 333 |
183 |
< |
Height = 15 |
183 |
> |
Height = 14 |
184 |
|
Top = 65 |
185 |
|
Width = 48 |
186 |
|
Caption = 'Job Title' |
188 |
|
end |
189 |
|
object Label11: TLabel |
190 |
|
Left = 17 |
191 |
< |
Height = 15 |
191 |
> |
Height = 14 |
192 |
|
Top = 122 |
193 |
|
Width = 73 |
194 |
|
Caption = 'Department' |
196 |
|
end |
197 |
|
object DBEdit5: TDBEdit |
198 |
|
Left = 17 |
199 |
< |
Height = 25 |
199 |
> |
Height = 24 |
200 |
|
Top = 136 |
201 |
|
Width = 495 |
202 |
|
DataField = 'DEPT_PATH' |
218 |
|
end |
219 |
|
object IBLookupComboEditBox2: TIBLookupComboEditBox |
220 |
|
Left = 392 |
221 |
< |
Height = 25 |
221 |
> |
Height = 23 |
222 |
|
Top = 32 |
223 |
|
Width = 203 |
224 |
|
Anchors = [akTop, akLeft, akRight] |
238 |
|
end |
239 |
|
object IBLookupComboEditBox3: TIBLookupComboEditBox |
240 |
|
Left = 331 |
241 |
< |
Height = 29 |
241 |
> |
Height = 28 |
242 |
|
Top = 82 |
243 |
|
Width = 264 |
244 |
|
Anchors = [akTop, akLeft, akRight] |
257 |
|
end |
258 |
|
object IBDateEdit1: TDBDateEdit |
259 |
|
Left = 17 |
260 |
< |
Height = 25 |
260 |
> |
Height = 24 |
261 |
|
Top = 82 |
262 |
|
Width = 112 |
263 |
|
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames] |
262 |
– |
OKCaption = 'OK' |
263 |
– |
CancelCaption = 'Cancel' |
264 |
|
DateOrder = doNone |
265 |
|
ButtonWidth = 23 |
266 |
|
AutoSelect = False |
303 |
|
end |
304 |
|
object IBDatabase1: TIBDatabase |
305 |
|
Connected = False |
306 |
+ |
CreateIfNotExists = False |
307 |
|
AllowStreamedConnected = False |
308 |
|
DatabaseName = 'localhost:employee' |
309 |
|
Params.Strings = ( |
310 |
< |
'lc_ctype=UTF-8' |
310 |
> |
'lc_ctype=UTF8' |
311 |
> |
'user_name=SYSDBA' |
312 |
|
'user_name=SYSDBA' |
313 |
|
) |
314 |
|
DefaultTransaction = IBTransaction1 |
315 |
|
IdleTimer = 0 |
316 |
|
TraceFlags = [] |
317 |
+ |
UseDefaultSystemCodePage = False |
318 |
|
left = 328 |
319 |
|
top = 24 |
320 |
|
end |
325 |
|
top = 24 |
326 |
|
end |
327 |
|
object Employees: TIBDataSet |
328 |
+ |
AllowAutoActivateTransaction = False |
329 |
|
Database = IBDatabase1 |
330 |
|
Transaction = IBTransaction1 |
331 |
|
AfterDelete = EmployeesAfterDelete |
343 |
|
) |
344 |
|
RefreshSQL.Strings = ( |
345 |
|
'with recursive Depts As (' |
346 |
< |
'Select DEPT_NO, DEPARTMENT, HEAD_DEPT, cast(DEPARTMENT as VarChar(256)) as DEPT_PATH,' |
346 |
> |
'Select DEPT_NO, DEPARTMENT, HEAD_DEPT, cast(DEPARTMENT as VarChar' |
347 |
> |
'(256)) as DEPT_PATH,' |
348 |
|
'cast(DEPT_NO as VarChar(64)) as DEPT_KEY_PATH' |
349 |
|
'From DEPARTMENT Where HEAD_DEPT is NULL ' |
350 |
|
'UNION ALL' |
351 |
< |
'Select DEPT_NO, DEPARTMENT, HEAD_DEPT, Depts.DEPT_PATH || '' / '' || DEPARTMENT as DEPT_PATH,' |
352 |
< |
'Depts.DEPT_KEY_PATH || '';'' || DEPT_NO as DEPT_KEY_PATH' |
353 |
< |
'From DEPARTMENT ' |
354 |
< |
'JOIN Depts On HEAD_DEPT = Depts.DEPT_NO' |
351 |
> |
'Select D.DEPT_NO, D.DEPARTMENT,D. HEAD_DEPT, Depts.DEPT_PATH || '' / '' ' |
352 |
> |
'|| D.DEPARTMENT as DEPT_PATH,' |
353 |
> |
'Depts.DEPT_KEY_PATH || '';'' || D.DEPT_NO as DEPT_KEY_PATH' |
354 |
> |
'From DEPARTMENT D' |
355 |
> |
'JOIN Depts On D.HEAD_DEPT = Depts.DEPT_NO' |
356 |
|
')' |
357 |
|
'' |
358 |
< |
'Select A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, ' |
359 |
< |
'A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH' |
358 |
> |
'Select A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, ' |
359 |
> |
'A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, ' |
360 |
> |
'A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, ' |
361 |
> |
'D.DEPT_KEY_PATH' |
362 |
|
'From EMPLOYEE A' |
363 |
|
'JOIN Depts D On D.DEPT_NO = A.DEPT_NO' |
364 |
+ |
'' |
365 |
|
'Where A.EMP_NO = :EMP_NO' |
366 |
|
) |
367 |
|
SelectSQL.Strings = ( |
370 |
|
'cast(DEPT_NO as VarChar(64)) as DEPT_KEY_PATH' |
371 |
|
'From DEPARTMENT Where HEAD_DEPT is NULL ' |
372 |
|
'UNION ALL' |
373 |
< |
'Select DEPT_NO, DEPARTMENT, HEAD_DEPT, Depts.DEPT_PATH || '' / '' || DEPARTMENT as DEPT_PATH,' |
374 |
< |
'Depts.DEPT_KEY_PATH || '';'' || DEPT_NO as DEPT_KEY_PATH' |
375 |
< |
'From DEPARTMENT ' |
376 |
< |
'JOIN Depts On HEAD_DEPT = Depts.DEPT_NO' |
373 |
> |
'Select D.DEPT_NO, D.DEPARTMENT,D. HEAD_DEPT, Depts.DEPT_PATH || '' / '' || D.DEPARTMENT as DEPT_PATH,' |
374 |
> |
'Depts.DEPT_KEY_PATH || '';'' || D.DEPT_NO as DEPT_KEY_PATH' |
375 |
> |
'From DEPARTMENT D' |
376 |
> |
'JOIN Depts On D.HEAD_DEPT = Depts.DEPT_NO' |
377 |
|
')' |
378 |
|
'' |
379 |
|
'Select A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, ' |
380 |
|
'A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH' |
381 |
|
'From EMPLOYEE A' |
382 |
|
'JOIN Depts D On D.DEPT_NO = A.DEPT_NO' |
383 |
+ |
'Order by 3 asc' |
384 |
|
) |
385 |
|
ModifySQL.Strings = ( |
386 |
|
'Update EMPLOYEE A Set '#13#10' A.EMP_NO = :EMP_NO,'#13#10' A.FIRST_NAME = :FIRST_NAME,'#13#10' A.LAST_NAME = :LAST_NAME,'#13#10' A.PHONE_EXT = :PHONE_EXT,'#13#10' A.HIRE_DATE = :HIRE_DATE,'#13#10' A.DEPT_NO = :DEPT_NO,'#13#10' A.JOB_CODE = :JOB_CODE,'#13#10' A.JOB_GRADE = :JOB_GRADE,'#13#10' A.JOB_COUNTRY = :JOB_COUNTRY,'#13#10' A.SALARY = :SALARY' |
555 |
|
top = 56 |
556 |
|
end |
557 |
|
object Countries: TIBQuery |
558 |
+ |
AllowAutoActivateTransaction = False |
559 |
|
Database = IBDatabase1 |
560 |
|
Transaction = IBTransaction1 |
561 |
|
BeforeOpen = CountriesBeforeOpen |
600 |
|
top = 58 |
601 |
|
end |
602 |
|
object JobCodes: TIBQuery |
603 |
+ |
AllowAutoActivateTransaction = False |
604 |
|
Database = IBDatabase1 |
605 |
|
Transaction = IBTransaction1 |
606 |
|
BeforeOpen = JobCodesBeforeOpen |