ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/examples/local-employeedb/unit1.lfm
Revision: 68
Committed: Tue Oct 17 10:07:58 2017 UTC (7 years, 1 month ago) by tony
File size: 27643 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

# User Rev Content
1 tony 37 object Form1: TForm1
2 tony 68 Left = 231
3 tony 37 Height = 482
4 tony 45 Top = 355
5 tony 37 Width = 1043
6     Caption = 'Employee List'
7 tony 68 ClientHeight = 462
8 tony 37 ClientWidth = 1043
9 tony 68 DefaultMonitor = dmPrimary
10 tony 37 Menu = MainMenu1
11     OnClose = FormClose
12     OnShow = FormShow
13 tony 68 Position = poScreenCenter
14     LCLVersion = '1.8.0.4'
15 tony 37 object Button1: TButton
16     Left = 956
17     Height = 25
18     Top = 48
19     Width = 75
20     Action = AddEmployee
21     Anchors = [akTop, akRight]
22     TabOrder = 0
23     end
24     object Button2: TButton
25     Left = 956
26     Height = 25
27     Top = 86
28     Width = 75
29     Action = EditEmployee
30     Anchors = [akTop, akRight]
31     TabOrder = 1
32     end
33     object Button3: TButton
34     Left = 956
35     Height = 25
36     Top = 125
37     Width = 75
38     Action = DeleteEmployee
39     Anchors = [akTop, akRight]
40     TabOrder = 2
41     end
42     object Label1: TLabel
43     Left = 17
44 tony 68 Height = 14
45 tony 37 Top = 14
46 tony 68 Width = 87
47 tony 37 Caption = 'Started Before'
48     ParentColor = False
49     end
50     object BeforeDate: TDateEdit
51     Left = 112
52 tony 68 Height = 24
53 tony 37 Top = 8
54     Width = 80
55     CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
56     DateOrder = doNone
57     ButtonWidth = 23
58     NumGlyphs = 1
59     MaxLength = 0
60     OnChange = BeforeDateChange
61     TabOrder = 3
62     end
63     object Label2: TLabel
64     Left = 241
65 tony 68 Height = 14
66 tony 37 Top = 14
67 tony 68 Width = 78
68 tony 37 Caption = 'Started After'
69     ParentColor = False
70     end
71     object AfterDate: TDateEdit
72     Left = 333
73 tony 68 Height = 24
74 tony 37 Top = 8
75     Width = 80
76     CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
77     DateOrder = doNone
78     ButtonWidth = 23
79     NumGlyphs = 1
80     MaxLength = 0
81     OnChange = BeforeDateChange
82     TabOrder = 4
83     end
84     object Panel1: TPanel
85     Left = 0
86 tony 68 Height = 414
87 tony 37 Top = 42
88     Width = 921
89     Anchors = [akTop, akLeft, akRight, akBottom]
90     BevelOuter = bvNone
91 tony 68 ClientHeight = 414
92 tony 37 ClientWidth = 921
93     Color = clBackground
94     ParentColor = False
95     TabOrder = 5
96     object IBDynamicGrid1: TIBDynamicGrid
97     Left = 0
98 tony 68 Height = 364
99 tony 37 Top = 0
100     Width = 921
101     Align = alClient
102     Color = clWindow
103     Columns = <
104     item
105     Title.Alignment = taCenter
106     Title.Caption = 'Last Name'
107     Width = 100
108     FieldName = 'LAST_NAME'
109     AutoSizeColumn = False
110     InitialSortColumn = False
111     DBLookupProperties.ItemHeight = 0
112     DBLookupProperties.ItemWidth = 0
113     DBLookupProperties.AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
114     end
115     item
116     Title.Alignment = taCenter
117     Title.Caption = 'First Name'
118     Width = 100
119     FieldName = 'FIRST_NAME'
120     AutoSizeColumn = False
121     InitialSortColumn = False
122     DBLookupProperties.ItemHeight = 0
123     DBLookupProperties.ItemWidth = 0
124     DBLookupProperties.AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
125     end
126     item
127     Alignment = taCenter
128     Title.Alignment = taCenter
129     Title.Caption = 'Emp No.'
130     Width = 60
131     FieldName = 'EMP_NO'
132     AutoSizeColumn = False
133     InitialSortColumn = False
134     DBLookupProperties.ItemHeight = 0
135     DBLookupProperties.ItemWidth = 0
136     DBLookupProperties.AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
137     end
138     item
139     ReadOnly = True
140     Title.Alignment = taCenter
141     Title.Caption = 'Dept'
142     Width = 200
143     FieldName = 'DEPT_PATH'
144     AutoSizeColumn = True
145     InitialSortColumn = False
146     DBLookupProperties.ItemHeight = 0
147     DBLookupProperties.ItemWidth = 0
148     DBLookupProperties.AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
149     end
150     item
151     ButtonStyle = cbsPickList
152     Title.Alignment = taCenter
153     Title.Caption = 'Located'
154     Width = 100
155     FieldName = 'JOB_COUNTRY'
156     AutoSizeColumn = False
157     InitialSortColumn = False
158     DBLookupProperties.ItemHeight = 0
159     DBLookupProperties.ItemWidth = 0
160     DBLookupProperties.ListSource = CountrySource
161     DBLookupProperties.ListField = 'COUNTRY'
162     DBLookupProperties.AutoInsert = False
163     DBLookupProperties.AutoComplete = False
164     end
165     item
166     Title.Alignment = taCenter
167     Title.Caption = 'Started'
168     Width = 80
169     FieldName = 'HIRE_DATE'
170     AutoSizeColumn = False
171     InitialSortColumn = False
172     DBLookupProperties.ItemHeight = 0
173     DBLookupProperties.ItemWidth = 0
174     DBLookupProperties.AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
175     end
176     item
177     Title.Alignment = taCenter
178     Title.Caption = 'Salary'
179     Width = 120
180     FieldName = 'SALARY'
181     ColumnTotalsControl = DBText1
182     AutoSizeColumn = False
183     InitialSortColumn = False
184     DBLookupProperties.ItemHeight = 0
185     DBLookupProperties.ItemWidth = 0
186     DBLookupProperties.AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
187     end>
188     DataSource = EmployeeSource
189     Scrollbars = ssAutoBoth
190     TabOrder = 0
191     EditorPanel = EmployeeEditorPanel
192     ExpandEditorPanelBelowRow = False
193     Descending = False
194     EditorBorderStyle = bsSingle
195     DefaultPositionAtEnd = False
196     IndexFieldNames = 'EMP_NO'
197     end
198     object Panel2: TPanel
199     Left = 0
200     Height = 50
201 tony 68 Top = 364
202 tony 37 Width = 921
203     Align = alBottom
204     BevelOuter = bvNone
205     ClientHeight = 50
206     ClientWidth = 921
207     ParentColor = False
208     TabOrder = 1
209     object Button5: TButton
210     Left = 80
211     Height = 25
212     Top = 16
213     Width = 75
214     Action = CancelChanges
215     Anchors = [akLeft, akBottom]
216     TabOrder = 0
217     end
218     object Button4: TButton
219     Left = 1
220     Height = 25
221     Top = 16
222     Width = 75
223     Action = SaveChanges
224     Anchors = [akLeft, akBottom]
225     TabOrder = 1
226     end
227     object DBText1: TDBText
228     Left = 688
229     Height = 27
230     Top = 16
231 tony 68 Width = 49
232 tony 37 Alignment = taRightJustify
233     Anchors = [akTop, akLeft, akBottom]
234     DataField = 'TOTALSALARIES'
235     DataSource = TotalsSource
236     ParentColor = False
237     end
238     end
239     object EmployeeEditorPanel: TPanel
240     Left = 8
241     Height = 80
242     Top = 40
243     Width = 832
244     BevelOuter = bvNone
245     BorderWidth = 2
246     BorderStyle = bsSingle
247     ClientHeight = 78
248     ClientWidth = 830
249     Color = clWindow
250     ParentColor = False
251     TabOrder = 2
252     Visible = False
253     object Label3: TLabel
254     Left = 0
255 tony 68 Height = 14
256 tony 37 Top = 7
257 tony 68 Width = 83
258 tony 37 Caption = 'Employee No.'
259     ParentColor = False
260     end
261     object DBEdit1: TDBEdit
262     Left = 90
263 tony 68 Height = 24
264 tony 37 Top = 2
265     Width = 120
266     DataField = 'EMP_NO'
267     DataSource = EmployeeSource
268     CharCase = ecNormal
269     MaxLength = 0
270     TabOrder = 0
271     end
272     object Label4: TLabel
273     Left = 12
274 tony 68 Height = 14
275 tony 37 Top = 32
276 tony 68 Width = 64
277 tony 37 Caption = 'First Name'
278     ParentColor = False
279     end
280     object DBEdit2: TDBEdit
281     Left = 90
282 tony 68 Height = 24
283 tony 37 Top = 24
284     Width = 120
285     DataField = 'FIRST_NAME'
286     DataSource = EmployeeSource
287     CharCase = ecNormal
288     MaxLength = 0
289     TabOrder = 1
290     end
291     object Label5: TLabel
292     Left = 12
293 tony 68 Height = 14
294 tony 37 Top = 56
295 tony 68 Width = 64
296 tony 37 Caption = 'Last Name'
297     ParentColor = False
298     end
299     object DBEdit3: TDBEdit
300     Left = 90
301 tony 68 Height = 24
302 tony 37 Top = 46
303     Width = 120
304     DataField = 'LAST_NAME'
305     DataSource = EmployeeSource
306     CharCase = ecNormal
307     MaxLength = 0
308     TabOrder = 2
309     end
310     object Label6: TLabel
311     Left = 216
312 tony 68 Height = 14
313 tony 37 Top = 7
314 tony 68 Width = 77
315 tony 37 Caption = 'Date Started'
316     ParentColor = False
317     end
318     object IBDateEdit1: TDBDateEdit
319     Left = 300
320 tony 68 Height = 24
321 tony 37 Top = 2
322     Width = 80
323     CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
324     DateOrder = doNone
325     ButtonWidth = 23
326     AutoSelect = False
327     NumGlyphs = 1
328     MaxLength = 0
329     TabOrder = 3
330     DataField = 'HIRE_DATE'
331     DataSource = EmployeeSource
332     end
333     object Label7: TLabel
334     Left = 252
335 tony 68 Height = 14
336 tony 37 Top = 32
337 tony 68 Width = 37
338 tony 37 Caption = 'Salary'
339     ParentColor = False
340     end
341     object DBEdit4: TDBEdit
342     Left = 300
343 tony 68 Height = 24
344 tony 37 Top = 24
345     Width = 104
346     DataField = 'SALARY'
347     DataSource = EmployeeSource
348     CharCase = ecNormal
349     MaxLength = 0
350     TabOrder = 5
351     end
352     object Label8: TLabel
353 tony 68 Left = 696
354     Height = 14
355 tony 37 Top = 54
356 tony 68 Width = 24
357 tony 37 Anchors = [akTop, akRight]
358     Caption = 'Ext.'
359     ParentColor = False
360     end
361     object DBEdit5: TDBEdit
362     Left = 720
363 tony 68 Height = 24
364 tony 37 Top = 48
365     Width = 40
366     DataField = 'PHONE_EXT'
367     DataSource = EmployeeSource
368     Anchors = [akTop, akRight]
369     CharCase = ecNormal
370     MaxLength = 0
371     TabOrder = 4
372     end
373     object Label9: TLabel
374     Left = 536
375 tony 68 Height = 14
376 tony 37 Top = 7
377 tony 68 Width = 51
378 tony 37 Caption = 'Location'
379     ParentColor = False
380     end
381     object Label10: TLabel
382     Left = 413
383 tony 68 Height = 14
384 tony 37 Top = 9
385 tony 68 Width = 59
386 tony 37 Caption = 'Job Grade'
387     ParentColor = False
388     end
389     object JobGradeDBComboBox: TDBComboBox
390     Left = 480
391     Height = 23
392     Top = 2
393     Width = 48
394     AutoSize = False
395     DataField = 'JOB_GRADE'
396     DataSource = EmployeeSource
397     ItemHeight = 0
398     Items.Strings = (
399     '1'
400     '2'
401     '3'
402     '4'
403     '5'
404     )
405     MaxLength = 0
406     OnCloseUp = JobGradeDBComboBoxCloseUp
407     Style = csDropDownList
408     TabOrder = 6
409     end
410     object Label11: TLabel
411     Left = 536
412 tony 68 Height = 14
413 tony 37 Top = 32
414 tony 68 Width = 48
415 tony 37 Caption = 'Job Title'
416     ParentColor = False
417     end
418     object Label12: TLabel
419     Left = 256
420 tony 68 Height = 14
421 tony 37 Top = 54
422 tony 68 Width = 33
423 tony 37 Caption = 'Dept.'
424     ParentColor = False
425     end
426     object SpeedButton1: TSpeedButton
427     Left = 664
428     Height = 25
429     Top = 48
430     Width = 23
431     Action = SelectDept
432     Anchors = [akTop, akRight]
433     end
434     object DBEdit6: TDBEdit
435     Left = 300
436 tony 68 Height = 24
437 tony 37 Top = 48
438     Width = 356
439     DataField = 'DEPT_PATH'
440     DataSource = EmployeeSource
441     ReadOnly = True
442     Anchors = [akTop, akLeft, akRight]
443     CharCase = ecNormal
444     MaxLength = 0
445     TabOrder = 7
446     end
447     object IBLookupComboEditBox2: TIBLookupComboEditBox
448     Left = 600
449     Height = 23
450     Top = 0
451     Width = 160
452     Anchors = [akTop, akLeft, akRight]
453     AutoSize = False
454     DataField = 'JOB_COUNTRY'
455     DataSource = EmployeeSource
456     KeyField = 'COUNTRY'
457     ListField = 'COUNTRY'
458     ListFieldIndex = 0
459     ListSource = CountrySource
460     LookupCache = False
461     Style = csDropDownList
462     TabOrder = 8
463     AutoInsert = False
464     AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
465     ItemHeight = 0
466     end
467     object IBLookupComboEditBox1: TIBLookupComboEditBox
468     Left = 600
469     Height = 23
470     Top = 24
471     Width = 160
472     Anchors = [akTop, akLeft, akRight]
473     AutoSize = False
474     DataField = 'JOB_CODE'
475     DataSource = EmployeeSource
476     KeyField = 'JOB_CODE'
477     ListField = 'JOB_TITLE'
478     ListFieldIndex = 0
479     ListSource = JobCodeSource
480     LookupCache = False
481     Style = csDropDownList
482     TabOrder = 9
483     AutoInsert = False
484     AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
485     ItemHeight = 0
486     end
487     object Panel3: TPanel
488     Left = 768
489     Height = 67
490     Top = 3
491     Width = 56
492     Anchors = [akTop, akRight]
493     Caption = 'No Image'
494     ClientHeight = 67
495     ClientWidth = 56
496     Font.Height = -10
497     ParentFont = False
498     TabOrder = 10
499     object DBImage1: TDBImage
500     Left = 1
501     Height = 65
502     Top = 1
503     Width = 54
504     Align = alClient
505     Center = True
506     DataField = 'PHOTO'
507     DataSource = EmployeeSource
508     OnDBImageRead = DBImage1DBImageRead
509     Proportional = True
510     end
511     end
512     end
513     end
514     object Label13: TLabel
515     Left = 456
516 tony 68 Height = 14
517 tony 37 Top = 14
518 tony 68 Width = 79
519 tony 37 Caption = 'Salary Range'
520     ParentColor = False
521     end
522     object SalaryRange: TComboBox
523     Left = 544
524 tony 68 Height = 25
525 tony 37 Top = 8
526     Width = 272
527     ItemHeight = 0
528     ItemIndex = 0
529     Items.Strings = (
530     'None Specified'
531     'Below $40,000'
532     'Between $40,000 and $100,000'
533     'Above $100,000'
534     )
535     OnCloseUp = BeforeDateChange
536     Style = csDropDownList
537     TabOrder = 6
538     Text = 'None Specified'
539     end
540     object IBDatabase1: TIBDatabase
541 tony 45 Connected = False
542 tony 37 LoginPrompt = False
543     AfterConnect = IBDatabase1AfterConnect
544 tony 45 CreateIfNotExists = False
545 tony 37 AllowStreamedConnected = False
546     DatabaseName = 'employee'
547     Params.Strings = (
548     'user_name=SYSDBA'
549     'lc_ctype=UTF8'
550     )
551     DefaultTransaction = IBTransaction1
552     IdleTimer = 0
553     TraceFlags = []
554 tony 45 UseDefaultSystemCodePage = False
555 tony 37 left = 832
556     top = 168
557     end
558     object IBTransaction1: TIBTransaction
559     Active = False
560     DefaultDatabase = IBDatabase1
561     Params.Strings = (
562     'read_committed'
563     'rec_version'
564     'nowait'
565     )
566     left = 872
567     top = 168
568     end
569     object EmployeeSource: TDataSource
570     DataSet = Employees
571     left = 832
572     top = 336
573     end
574     object ActionList1: TActionList
575     left = 832
576     top = 416
577     object AddEmployee: TAction
578     Caption = 'Add'
579     OnExecute = AddEmployeeExecute
580     end
581     object EditEmployee: TAction
582     Caption = 'Edit'
583     OnExecute = EditEmployeeExecute
584     OnUpdate = EditEmployeeUpdate
585     end
586     object DeleteEmployee: TAction
587     Caption = 'Delete'
588     OnExecute = DeleteEmployeeExecute
589     OnUpdate = EditEmployeeUpdate
590     end
591     object SaveChanges: TAction
592     Caption = 'Save'
593     OnExecute = SaveChangesExecute
594     OnUpdate = SaveChangesUpdate
595     end
596     object CancelChanges: TAction
597     Caption = 'Cancel'
598     OnExecute = CancelChangesExecute
599     OnUpdate = SaveChangesUpdate
600     end
601     object SelectDept: TAction
602     Caption = '...'
603     OnExecute = SelectDeptExecute
604     end
605     object NewDatabase: TAction
606     Category = 'LocalDB'
607     Caption = 'Reinitialise Database'
608     OnExecute = NewDatabaseExecute
609     end
610     object SaveDatabase: TAction
611     Category = 'LocalDB'
612     Caption = 'Save Database to Archive'
613     OnExecute = SaveDatabaseExecute
614     end
615     object RestoreDatabase: TAction
616     Category = 'LocalDB'
617     Caption = 'Restore Database From Archive'
618     OnExecute = RestoreDatabaseExecute
619     end
620     object Quit: TAction
621     Caption = 'Quit'
622     OnExecute = QuitExecute
623     end
624     end
625     object CountrySource: TDataSource
626     DataSet = Countries
627     left = 832
628     top = 296
629     end
630     object TotalsQuery: TIBQuery
631 tony 45 AllowAutoActivateTransaction = False
632 tony 37 Database = IBDatabase1
633     Transaction = IBTransaction1
634     BeforeOpen = EmployeesBeforeOpen
635     BufferChunks = 1000
636     CachedUpdates = False
637     GenerateParamNames = False
638     GeneratorField.ApplyOnEvent = gaeOnNewRecord
639     SQL.Strings = (
640     'Select sum(Salary) as TotalSalaries'
641     'From EMPLOYEE'
642     )
643     Params = <>
644     DataSetCloseAction = dcDiscardChanges
645     left = 872
646     top = 376
647     object TotalsQueryTOTALSALARIES: TIBBCDField
648     DisplayWidth = 18
649     FieldKind = fkData
650     FieldName = 'TOTALSALARIES'
651     Index = 0
652     LookupCache = False
653     ProviderFlags = [pfInUpdate, pfInWhere]
654     ReadOnly = False
655     Required = False
656     OnGetText = EmployeesSALARYGetText
657     Precision = 18
658     Currency = False
659     MaxValue = 0
660     MinValue = 0
661     Size = 2
662     end
663     end
664     object TotalsSource: TDataSource
665     DataSet = TotalsQuery
666     left = 832
667     top = 376
668     end
669     object Employees: TIBDataSet
670 tony 45 AllowAutoActivateTransaction = False
671 tony 37 Database = IBDatabase1
672     Transaction = IBTransaction1
673     AfterDelete = EmployeesAfterDelete
674     AfterEdit = EmployeesAfterDelete
675     AfterInsert = EmployeesAfterInsert
676     AfterOpen = EmployeesAfterOpen
677     AfterPost = EmployeesAfterPost
678     AfterScroll = EmployeesAfterScroll
679     BeforeClose = EmployeesBeforeClose
680     BeforeOpen = EmployeesBeforeOpen
681     BufferChunks = 1000
682     CachedUpdates = False
683     DeleteSQL.Strings = (
684     'Delete From EMPLOYEE A'
685     'Where A.EMP_NO = :EMP_NO'
686     )
687     InsertSQL.Strings = (
688     'Insert Into EMPLOYEE(EMP_NO, FIRST_NAME, LAST_NAME, PHONE_EXT, HIRE_DATE, DEPT_NO, JOB_CODE, JOB_GRADE, JOB_COUNTRY, SALARY)'
689     'Values(:EMP_NO, :FIRST_NAME, :LAST_NAME, :PHONE_EXT, :HIRE_DATE, :DEPT_NO, :JOB_CODE, :JOB_GRADE, :JOB_COUNTRY, :SALARY)'
690     )
691     RefreshSQL.Strings = (
692     'Select A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, '
693     'A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, A.DEPT_PATH, A.DEPT_KEY_PATH, A.PHOTO'
694     'From DEPTLIST A'
695     'Where A.EMP_NO = :EMP_NO'
696     )
697     SelectSQL.Strings = (
698     'Select A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, '
699     'A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, A.DEPT_PATH, A.DEPT_KEY_PATH, A.PHOTO'
700     'From DEPTLIST A'
701     ''
702     )
703     ModifySQL.Strings = (
704     'Update EMPLOYEE A Set '#13#10' A.DEPT_NO = :DEPT_NO,'#13#10' A.FIRST_NAME = :FIRST_NAME,'#13#10' A.HIRE_DATE = :HIRE_DATE,'#13#10' A.JOB_CODE = :JOB_CODE,'#13#10' A.JOB_COUNTRY = :JOB_COUNTRY,'#13#10' A.JOB_GRADE = :JOB_GRADE,'#13#10' A.LAST_NAME = :LAST_NAME,'#13#10' A.PHONE_EXT = :PHONE_EXT,'#13#10' A.SALARY = :SALARY'
705     'Where A.EMP_NO = :OLD_EMP_NO'
706     )
707     GeneratorField.Generator = 'EMP_NO_GEN'
708     GeneratorField.Field = 'EMP_NO'
709     GeneratorField.ApplyOnEvent = gaeOnNewRecord
710     GenerateParamNames = False
711     DataSetCloseAction = dcSaveChanges
712     AfterTransactionEnd = EmployeesAfterTransactionEnd
713     OnValidatePost = EmployeesValidatePost
714     left = 872
715     top = 336
716     object EmployeesEMP_NO: TSmallintField
717     DisplayWidth = 10
718     FieldKind = fkData
719     FieldName = 'EMP_NO'
720     Index = 0
721     LookupCache = False
722     ProviderFlags = [pfInUpdate, pfInWhere]
723     ReadOnly = False
724     Required = True
725     end
726     object EmployeesFIRST_NAME: TIBStringField
727     DisplayWidth = 15
728     FieldKind = fkData
729     FieldName = 'FIRST_NAME'
730     Index = 1
731     LookupCache = False
732     ProviderFlags = [pfInUpdate, pfInWhere]
733     ReadOnly = False
734     Required = True
735     Size = 15
736     end
737     object EmployeesLAST_NAME: TIBStringField
738     DisplayWidth = 20
739     FieldKind = fkData
740     FieldName = 'LAST_NAME'
741     Index = 2
742     LookupCache = False
743     ProviderFlags = [pfInUpdate, pfInWhere]
744     ReadOnly = False
745     Required = True
746     end
747     object EmployeesPHONE_EXT: TIBStringField
748     Alignment = taRightJustify
749     DisplayWidth = 4
750     FieldKind = fkData
751     FieldName = 'PHONE_EXT'
752     Index = 3
753     LookupCache = False
754     ProviderFlags = [pfInUpdate, pfInWhere]
755     ReadOnly = False
756     Required = False
757     Size = 4
758     end
759     object EmployeesHIRE_DATE: TDateTimeField
760     DisplayWidth = 10
761     FieldKind = fkData
762     FieldName = 'HIRE_DATE'
763     Index = 4
764     LookupCache = False
765     ProviderFlags = [pfInUpdate, pfInWhere]
766     ReadOnly = False
767     Required = True
768     end
769     object EmployeesDEPT_NO: TIBStringField
770     DisplayWidth = 3
771     FieldKind = fkData
772     FieldName = 'DEPT_NO'
773     Index = 5
774     LookupCache = False
775     ProviderFlags = [pfInUpdate, pfInWhere]
776     ReadOnly = False
777     Required = True
778     Size = 3
779     end
780     object EmployeesJOB_CODE: TIBStringField
781     DisplayWidth = 5
782     FieldKind = fkData
783     FieldName = 'JOB_CODE'
784     Index = 6
785     LookupCache = False
786     ProviderFlags = [pfInUpdate, pfInWhere]
787     ReadOnly = False
788     Required = True
789     OnChange = EmployeesJOB_CODEChange
790     Size = 5
791     end
792     object EmployeesJOB_GRADE: TSmallintField
793     DisplayWidth = 10
794     FieldKind = fkData
795     FieldName = 'JOB_GRADE'
796     Index = 7
797     LookupCache = False
798     ProviderFlags = [pfInUpdate, pfInWhere]
799     ReadOnly = False
800     Required = True
801     OnChange = EmployeesJOB_GRADEChange
802     end
803     object EmployeesJOB_COUNTRY: TIBStringField
804     DisplayWidth = 15
805     FieldKind = fkData
806     FieldName = 'JOB_COUNTRY'
807     Index = 8
808     LookupCache = False
809     ProviderFlags = [pfInUpdate, pfInWhere]
810     ReadOnly = False
811     Required = True
812     Size = 15
813     end
814     object EmployeesSALARY: TIBBCDField
815     DisplayWidth = 18
816     FieldKind = fkData
817     FieldName = 'SALARY'
818     Index = 9
819     LookupCache = False
820     ProviderFlags = [pfInUpdate, pfInWhere]
821     ReadOnly = False
822     Required = True
823     OnGetText = EmployeesSALARYGetText
824     Precision = 18
825     Currency = False
826     MaxValue = 0
827     MinValue = 0
828     Size = 2
829     end
830     object EmployeesFULL_NAME: TIBStringField
831     DisplayWidth = 37
832     FieldKind = fkData
833     FieldName = 'FULL_NAME'
834     Index = 10
835     LookupCache = False
836     ProviderFlags = [pfInUpdate, pfInWhere]
837     ReadOnly = True
838     Required = False
839     Size = 37
840     end
841     object EmployeesDEPT_PATH: TIBStringField
842     DisplayWidth = 256
843     FieldKind = fkData
844     FieldName = 'DEPT_PATH'
845     Index = 11
846     LookupCache = False
847     ProviderFlags = [pfInUpdate, pfInWhere]
848     ReadOnly = False
849     Required = True
850     Size = 256
851     end
852     object EmployeesDEPT_KEY_PATH: TIBStringField
853     DisplayWidth = 64
854     FieldKind = fkData
855     FieldName = 'DEPT_KEY_PATH'
856     Index = 12
857     LookupCache = False
858     ProviderFlags = [pfInUpdate, pfInWhere]
859     ReadOnly = False
860     Required = True
861     Size = 64
862     end
863     object EmployeesPHOTO1: TBlobField
864     DisplayWidth = 10
865     FieldKind = fkData
866     FieldName = 'PHOTO'
867     Index = 13
868     LookupCache = False
869     ProviderFlags = [pfInUpdate, pfInWhere]
870     ReadOnly = False
871     Required = False
872     end
873     end
874     object Countries: TIBQuery
875 tony 45 AllowAutoActivateTransaction = False
876 tony 37 Database = IBDatabase1
877     Transaction = IBTransaction1
878     BeforeOpen = CountriesBeforeOpen
879     BufferChunks = 1000
880     CachedUpdates = False
881     GenerateParamNames = False
882     GeneratorField.ApplyOnEvent = gaeOnNewRecord
883     SQL.Strings = (
884     'Select A.COUNTRY, A.CURRENCY From COUNTRY A'
885     'JOIN JOB J On J.JOB_COUNTRY = A.COUNTRY'
886     'Where J.JOB_CODE = :JOB_CODE and J.JOB_GRADE = :JOB_GRADE'
887     'Order by 1'
888     )
889     Params = <
890     item
891     DataType = ftUnknown
892     Name = 'JOB_CODE'
893     ParamType = ptInput
894     end
895     item
896     DataType = ftUnknown
897     Name = 'JOB_GRADE'
898     ParamType = ptInput
899     end>
900     DataSetCloseAction = dcDiscardChanges
901     left = 872
902     top = 296
903     ParamData = <
904     item
905     DataType = ftUnknown
906     Name = 'JOB_CODE'
907     ParamType = ptInput
908     end
909     item
910     DataType = ftUnknown
911     Name = 'JOB_GRADE'
912     ParamType = ptInput
913     end>
914     end
915     object JobCodeSource: TDataSource
916     DataSet = JobCodes
917     left = 832
918     top = 256
919     end
920     object JobCodes: TIBQuery
921 tony 45 AllowAutoActivateTransaction = False
922 tony 37 Database = IBDatabase1
923     Transaction = IBTransaction1
924     BeforeOpen = JobCodesBeforeOpen
925     BufferChunks = 1000
926     CachedUpdates = False
927     GenerateParamNames = False
928     GeneratorField.ApplyOnEvent = gaeOnNewRecord
929     SQL.Strings = (
930     'Select A.JOB_CODE, A.JOB_TITLE From JOB A'
931     'Where JOB_COUNTRY = :JOB_COUNTRY and JOB_GRADE = :JOB_GRADE'
932     'Order by Upper(JOB_TITLE)'
933     )
934     Params = <
935     item
936     DataType = ftUnknown
937     Name = 'JOB_COUNTRY'
938     ParamType = ptInput
939     end
940     item
941     DataType = ftUnknown
942     Name = 'JOB_GRADE'
943     ParamType = ptInput
944     end>
945     DataSetCloseAction = dcDiscardChanges
946     left = 872
947     top = 256
948     ParamData = <
949     item
950     DataType = ftUnknown
951     Name = 'JOB_COUNTRY'
952     ParamType = ptInput
953     end
954     item
955     DataType = ftUnknown
956     Name = 'JOB_GRADE'
957     ParamType = ptInput
958     end>
959     end
960     object Depts: TIBQuery
961 tony 45 AllowAutoActivateTransaction = False
962 tony 37 Database = IBDatabase1
963     Transaction = IBTransaction1
964     BufferChunks = 1000
965     CachedUpdates = False
966     GenerateParamNames = False
967     GeneratorField.ApplyOnEvent = gaeOnNewRecord
968     SQL.Strings = (
969     'Select A.DEPT_NO, A.DEPARTMENT From DEPARTMENT A'
970     ''
971     'Order by Upper(Department)'
972     )
973     Params = <>
974     DataSetCloseAction = dcDiscardChanges
975     left = 872
976     top = 208
977     end
978     object DeptsSource: TDataSource
979     DataSet = Depts
980     left = 832
981     top = 208
982     end
983     object JobGradeChangeTimer: TTimer
984     Interval = 0
985     OnTimer = JobGradeChangeTimerTimer
986     left = 928
987     top = 175
988     end
989     object JobCodeChangeTimer: TTimer
990     Interval = 0
991     OnTimer = JobCodeChangeTimerTimer
992     left = 927
993     top = 224
994     end
995     object IBLocalDBSupport1: TIBLocalDBSupport
996     Database = IBDatabase1
997     DatabaseName = 'employee.fdb'
998     EmptyDBArchive = 'employee.gbk'
999     Options = [iblAutoUpgrade, iblAllowDowngrade]
1000     RequiredVersionNo = 2
1001     UpgradeConfFile = 'upgrade.conf'
1002     VendorName = 'MWA Software'
1003     OnGetDBVersionNo = IBLocalDBSupport1GetDBVersionNo
1004     left = 937
1005     top = 264
1006     end
1007     object MainMenu1: TMainMenu
1008     left = 937
1009     top = 318
1010     object MenuItem1: TMenuItem
1011     Caption = 'File'
1012     object MenuItem2: TMenuItem
1013     Action = NewDatabase
1014     end
1015     object MenuItem3: TMenuItem
1016     Caption = '-'
1017     end
1018     object MenuItem4: TMenuItem
1019     Action = SaveDatabase
1020     end
1021     object MenuItem5: TMenuItem
1022     Action = RestoreDatabase
1023     end
1024     object MenuItem6: TMenuItem
1025     Caption = '-'
1026     end
1027     object MenuItem7: TMenuItem
1028     Action = Quit
1029     end
1030     end
1031     end
1032     object CheckVersionTablePresent: TIBSQL
1033     Database = IBDatabase1
1034     GenerateParamNames = False
1035     UniqueParamNames = False
1036     ParamCheck = True
1037     SQL.Strings = (
1038     'Select * From RDB$RELATIONS Where RDB$RELATION_NAME = ''DBVERSIONINFO'';'
1039     )
1040     Transaction = IBTransaction1
1041     left = 937
1042     top = 358
1043     end
1044     object GetDBVersionNoQuery: TIBSQL
1045     Database = IBDatabase1
1046     GenerateParamNames = False
1047     UniqueParamNames = False
1048     ParamCheck = True
1049     SQL.Strings = (
1050     'Select VersionNo From DBVersionInfo'
1051     )
1052     Transaction = IBTransaction1
1053     left = 936
1054     top = 399
1055     end
1056     end