ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/examples/local-employeedb/unit1.lfm
Revision: 62
Committed: Wed Apr 12 09:19:59 2017 UTC (7 years ago) by tony
File size: 27586 byte(s)
Log Message:
Avoid "Object is nil" error when opening a database with DefaultSystemCodePage = true

File Contents

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