object Form1: TForm1 Left = 616 Height = 329 Top = 256 Width = 658 Caption = 'IBLookup Combo Box Demo' ClientHeight = 329 ClientWidth = 658 DefaultMonitor = dmPrimary OnClose = FormClose OnShow = FormShow Position = poScreenCenter LCLVersion = '1.8.1.0' object Label1: TLabel Left = 16 Height = 14 Top = 16 Width = 98 Caption = 'Employee Name' ParentColor = False end object IBLookupComboEditBox1: TIBLookupComboEditBox Left = 16 Height = 27 Top = 32 Width = 224 KeyField = 'EMP_NO' ListField = 'FULL_NAME' ListFieldIndex = 0 ListSource = EmployeeSource LookupCache = False ScrollListDataset = True TabOrder = 0 AutoInsert = True AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactRetainPrefixCase, cbactSearchAscending] ItemHeight = 0 KeyPressInterval = 600 OnCanAutoInsert = IBLookupComboEditBox1CanAutoInsert end object Label2: TLabel Left = 16 Height = 14 Top = 79 Width = 103 Caption = 'Employee Details' ParentColor = False end object Panel1: TPanel Left = 19 Height = 185 Top = 97 Width = 623 Anchors = [akTop, akLeft, akRight, akBottom] BevelInner = bvLowered BevelOuter = bvLowered ClientHeight = 185 ClientWidth = 623 TabOrder = 1 object Label3: TLabel Left = 14 Height = 14 Top = 18 Width = 64 Caption = 'First Name' ParentColor = False end object DBEdit1: TDBEdit Left = 14 Height = 24 Top = 32 Width = 136 DataField = 'FIRST_NAME' DataSource = EmployeeSource CharCase = ecNormal MaxLength = 0 TabOrder = 0 end object Label4: TLabel Left = 168 Height = 14 Top = 18 Width = 64 Caption = 'Last Name' ParentColor = False end object DBEdit2: TDBEdit Left = 168 Height = 24 Top = 32 Width = 144 DataField = 'LAST_NAME' DataSource = EmployeeSource CharCase = ecNormal MaxLength = 0 TabOrder = 1 end object Label5: TLabel Left = 547 Height = 14 Top = 120 Width = 24 Anchors = [akTop, akRight] Caption = 'Ext.' ParentColor = False end object DBEdit3: TDBEdit Left = 547 Height = 24 Top = 136 Width = 48 DataField = 'PHONE_EXT' DataSource = EmployeeSource Anchors = [akTop, akRight] CharCase = ecNormal MaxLength = 0 TabOrder = 3 end object Label6: TLabel Left = 16 Height = 14 Top = 65 Width = 56 Caption = 'Hire Date' ParentColor = False end object Label7: TLabel Left = 172 Height = 14 Top = 65 Width = 37 Caption = 'Salary' ParentColor = False end object DBEdit4: TDBEdit Left = 168 Height = 24 Top = 80 Width = 144 DataField = 'SALARY' DataSource = EmployeeSource CharCase = ecNormal MaxLength = 0 TabOrder = 4 end object Label8: TLabel Left = 392 Height = 14 Top = 16 Width = 51 Caption = 'Location' ParentColor = False end object Label9: TLabel Left = 331 Height = 14 Top = 16 Width = 36 Caption = 'Grade' ParentColor = False end object DBComboBox1: TDBComboBox Left = 331 Height = 28 Top = 32 Width = 53 DataField = 'JOB_GRADE' DataSource = EmployeeSource ItemHeight = 0 Items.Strings = ( '1' '2' '3' '4' '5' ) MaxLength = 0 OnCloseUp = DBComboBox1CloseUp Style = csDropDownList TabOrder = 2 end object Label10: TLabel Left = 333 Height = 14 Top = 65 Width = 48 Caption = 'Job Title' ParentColor = False end object Label11: TLabel Left = 17 Height = 14 Top = 122 Width = 73 Caption = 'Department' ParentColor = False end object DBEdit5: TDBEdit Left = 17 Height = 24 Top = 136 Width = 495 DataField = 'DEPT_PATH' DataSource = EmployeeSource ReadOnly = True Anchors = [akTop, akLeft, akRight] CharCase = ecNormal MaxLength = 0 TabOrder = 5 end object SpeedButton1: TSpeedButton Left = 516 Height = 25 Top = 136 Width = 25 Anchors = [akTop, akRight] Caption = '...' OnClick = SpeedButton1Click end object IBLookupComboEditBox2: TIBLookupComboEditBox Left = 392 Height = 23 Top = 32 Width = 203 Anchors = [akTop, akLeft, akRight] AutoSize = False DataField = 'JOB_COUNTRY' DataSource = EmployeeSource KeyField = 'COUNTRY' ListField = 'COUNTRY' ListFieldIndex = 0 ListSource = CountriesSource LookupCache = False Style = csDropDownList TabOrder = 6 AutoInsert = False AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending] ItemHeight = 0 end object IBLookupComboEditBox3: TIBLookupComboEditBox Left = 331 Height = 28 Top = 82 Width = 264 Anchors = [akTop, akLeft, akRight] DataField = 'JOB_CODE' DataSource = EmployeeSource KeyField = 'JOB_CODE' ListField = 'JOB_TITLE' ListFieldIndex = 0 ListSource = JobCodeSource LookupCache = False Style = csDropDownList TabOrder = 7 AutoInsert = False AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending] ItemHeight = 0 end object IBDateEdit1: TDBDateEdit Left = 17 Height = 24 Top = 82 Width = 112 CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames] DateOrder = doNone ButtonWidth = 23 AutoSelect = False NumGlyphs = 1 MaxLength = 0 TabOrder = 8 DataField = 'HIRE_DATE' DataSource = EmployeeSource end end object CancelBtn: TButton Left = 567 Height = 25 Top = 293 Width = 75 Anchors = [akRight, akBottom] Caption = 'Cancel' OnClick = CancelBtnClick TabOrder = 2 end object SaveBtn: TButton Left = 481 Height = 25 Top = 293 Width = 75 Anchors = [akRight, akBottom] Caption = 'Save' OnClick = SaveBtnClick TabOrder = 3 end object DeleteBtn: TButton Left = 18 Height = 25 Top = 294 Width = 75 Anchors = [akLeft, akBottom] Caption = 'Delete' OnClick = DeleteBtnClick TabOrder = 4 end object IBDatabase1: TIBDatabase Connected = False CreateIfNotExists = False AllowStreamedConnected = False DatabaseName = 'localhost:employee' Params.Strings = ( 'lc_ctype=UTF8' 'user_name=SYSDBA' 'user_name=SYSDBA' ) DefaultTransaction = IBTransaction1 IdleTimer = 0 TraceFlags = [] UseDefaultSystemCodePage = False left = 224 top = 18 end object IBTransaction1: TIBTransaction Active = False DefaultDatabase = IBDatabase1 left = 136 top = 18 end object Employees: TIBDataSet AllowAutoActivateTransaction = False Database = IBDatabase1 Transaction = IBTransaction1 AfterDelete = EmployeesAfterDelete AfterEdit = EmployeesAfterDelete AfterInsert = EmployeesAfterInsert AfterPost = EmployeesAfterPost BufferChunks = 1000 CachedUpdates = False DeleteSQL.Strings = ( 'Execute Procedure DELETE_EMPLOYEE :EMP_NO' ) InsertSQL.Strings = ( 'Insert Into EMPLOYEE(EMP_NO, FIRST_NAME, LAST_NAME, PHONE_EXT, HIRE_DATE, DEPT_NO, JOB_CODE, JOB_GRADE, JOB_COUNTRY, SALARY)' 'Values(:EMP_NO, :FIRST_NAME, :LAST_NAME, :PHONE_EXT, :HIRE_DATE, :DEPT_NO, :JOB_CODE, :JOB_GRADE, :JOB_COUNTRY, :SALARY)' ) RefreshSQL.Strings = ( 'with recursive Depts As (' 'Select DEPT_NO, DEPARTMENT, HEAD_DEPT, cast(DEPARTMENT as VarChar' '(256)) as DEPT_PATH,' 'cast(DEPT_NO as VarChar(64)) as DEPT_KEY_PATH' 'From DEPARTMENT Where HEAD_DEPT is NULL ' 'UNION ALL' 'Select D.DEPT_NO, D.DEPARTMENT,D. HEAD_DEPT, Depts.DEPT_PATH || '' / '' ' '|| D.DEPARTMENT as DEPT_PATH,' 'Depts.DEPT_KEY_PATH || '';'' || D.DEPT_NO as DEPT_KEY_PATH' 'From DEPARTMENT D' 'JOIN Depts On D.HEAD_DEPT = Depts.DEPT_NO' ')' '' 'Select A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, ' 'A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, ' 'A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, ' 'D.DEPT_KEY_PATH' 'From EMPLOYEE A' 'JOIN Depts D On D.DEPT_NO = A.DEPT_NO' '' 'Where A.EMP_NO = :EMP_NO' ) SelectSQL.Strings = ( 'with recursive Depts As (' 'Select DEPT_NO, DEPARTMENT, HEAD_DEPT, cast(DEPARTMENT as VarChar(256)) as DEPT_PATH,' 'cast(DEPT_NO as VarChar(64)) as DEPT_KEY_PATH' 'From DEPARTMENT Where HEAD_DEPT is NULL ' 'UNION ALL' 'Select D.DEPT_NO, D.DEPARTMENT,D. HEAD_DEPT, Depts.DEPT_PATH || '' / '' || D.DEPARTMENT as DEPT_PATH,' 'Depts.DEPT_KEY_PATH || '';'' || D.DEPT_NO as DEPT_KEY_PATH' 'From DEPARTMENT D' 'JOIN Depts On D.HEAD_DEPT = Depts.DEPT_NO' ')' '' 'Select A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, ' 'A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH' 'From EMPLOYEE A' 'JOIN Depts D On D.DEPT_NO = A.DEPT_NO' 'Order by 3 asc' ) ModifySQL.Strings = ( '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' 'Where A.EMP_NO = :OLD_EMP_NO' ) GeneratorField.Generator = 'EMP_NO_GEN' GeneratorField.Field = 'EMP_NO' GeneratorField.ApplyOnEvent = gaeOnNewRecord GenerateParamNames = False DataSetCloseAction = dcSaveChanges AfterTransactionEnd = EmployeesAfterTransactionEnd left = 376 top = 264 object EmployeesEMP_NO: TSmallintField DisplayWidth = 10 FieldKind = fkData FieldName = 'EMP_NO' Index = 0 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True end object EmployeesFIRST_NAME: TIBStringField DisplayWidth = 15 FieldKind = fkData FieldName = 'FIRST_NAME' Index = 1 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True Size = 15 end object EmployeesLAST_NAME: TIBStringField DisplayWidth = 20 FieldKind = fkData FieldName = 'LAST_NAME' Index = 2 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True end object EmployeesPHONE_EXT: TIBStringField Alignment = taRightJustify DisplayWidth = 4 FieldKind = fkData FieldName = 'PHONE_EXT' Index = 3 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = False Size = 4 end object EmployeesHIRE_DATE: TDateTimeField DisplayWidth = 10 FieldKind = fkData FieldName = 'HIRE_DATE' Index = 4 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True end object EmployeesDEPT_NO: TIBStringField DisplayWidth = 3 FieldKind = fkData FieldName = 'DEPT_NO' Index = 5 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True Size = 3 end object EmployeesJOB_CODE: TIBStringField DisplayWidth = 5 FieldKind = fkData FieldName = 'JOB_CODE' Index = 6 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True OnChange = EmployeesJOB_CODEChange Size = 5 end object EmployeesJOB_GRADE: TSmallintField DisplayWidth = 10 FieldKind = fkData FieldName = 'JOB_GRADE' Index = 7 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True OnChange = EmployeesJOB_GRADEChange end object EmployeesJOB_COUNTRY: TIBStringField DisplayWidth = 15 FieldKind = fkData FieldName = 'JOB_COUNTRY' Index = 8 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True Size = 15 end object EmployeesSALARY: TIBBCDField DisplayWidth = 18 FieldKind = fkData FieldName = 'SALARY' Index = 9 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True OnGetText = EmployeesSALARYGetText Precision = 18 Currency = False MaxValue = 0 MinValue = 0 Size = 2 end object EmployeesFULL_NAME: TIBStringField DisplayWidth = 37 FieldKind = fkData FieldName = 'FULL_NAME' Index = 10 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = False OnChange = EmployeesFULL_NAMEChange Size = 37 end object EmployeesDEPT_PATH: TIBStringField DisplayWidth = 256 FieldKind = fkData FieldName = 'DEPT_PATH' Index = 11 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True Size = 256 end object EmployeesDEPT_KEY_PATH: TIBStringField DisplayWidth = 64 FieldKind = fkData FieldName = 'DEPT_KEY_PATH' Index = 12 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True Size = 64 end end object EmployeeSource: TDataSource DataSet = Employees OnDataChange = EmployeeSourceDataChange left = 272 top = 264 end object ApplicationProperties1: TApplicationProperties OnIdle = ApplicationProperties1Idle left = 152 top = 280 end object Countries: TIBQuery AllowAutoActivateTransaction = False Database = IBDatabase1 Transaction = IBTransaction1 BeforeOpen = CountriesBeforeOpen BufferChunks = 1000 CachedUpdates = False GenerateParamNames = False GeneratorField.ApplyOnEvent = gaeOnNewRecord SQL.Strings = ( 'Select A.COUNTRY, A.CURRENCY From COUNTRY A' 'JOIN JOB J On J.JOB_COUNTRY = A.COUNTRY' 'Where J.JOB_CODE = :JOB_CODE and J.JOB_GRADE = :JOB_GRADE' ) Params = < item DataType = ftUnknown Name = 'JOB_CODE' ParamType = ptInput end item DataType = ftUnknown Name = 'JOB_GRADE' ParamType = ptInput end> DataSetCloseAction = dcDiscardChanges left = 616 top = 16 ParamData = < item DataType = ftUnknown Name = 'JOB_CODE' ParamType = ptInput end item DataType = ftUnknown Name = 'JOB_GRADE' ParamType = ptInput end> end object CountriesSource: TDataSource DataSet = Countries left = 528 top = 18 end object JobCodes: TIBQuery AllowAutoActivateTransaction = False Database = IBDatabase1 Transaction = IBTransaction1 BeforeOpen = JobCodesBeforeOpen BufferChunks = 1000 CachedUpdates = False GenerateParamNames = False GeneratorField.ApplyOnEvent = gaeOnNewRecord SQL.Strings = ( 'Select distinct A.JOB_CODE, A.JOB_TITLE From JOB A' 'Where JOB_GRADE = :JOB_GRADE' 'order by 2' ) Params = < item DataType = ftUnknown Name = 'JOB_GRADE' ParamType = ptInput end> DataSetCloseAction = dcDiscardChanges left = 416 top = 18 ParamData = < item DataType = ftUnknown Name = 'JOB_GRADE' ParamType = ptInput end> end object JobCodeSource: TDataSource DataSet = JobCodes left = 328 top = 18 end end