cachedupdates.xfm
来自「Crlab公司用来连接MySQL数据库的控件」· XFM 代码 · 共 423 行
XFM
423 行
inherited CachedUpdatesFrame: TCachedUpdatesFrame Width = 667 Height = 304 VertScrollBar.Range = 102 Align = alClient object DBGrid: TDBGrid Left = 0 Top = 102 Width = 667 Height = 202 Align = alClient DataSource = DataSource Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgCancelOnExit] TabOrder = 0 TitleFont.Color = clBlack TitleFont.Height = 11 TitleFont.Name = 'helvetica' TitleFont.Pitch = fpVariable TitleFont.Style = [] OnDrawDataCell = DBGridDrawDataCell end object Panel8: TPanel Left = 0 Top = 0 Width = 667 Height = 102 Align = alTop BevelOuter = bvNone TabOrder = 1 object ToolBar: TPanel Left = 1 Top = 1 Width = 667 Height = 100 BevelOuter = bvNone Color = 16591631 Font.Color = clText Font.Height = 11 Font.Name = 'MS Sans Serif' Font.Pitch = fpVariable Font.Style = [] ParentColor = False ParentFont = False TabOrder = 0 object btOpen: TSpeedButton Left = 1 Top = 1 Width = 82 Height = 22 Caption = 'Open' Flat = True Transparent = False OnClick = btOpenClick end object btClose: TSpeedButton Left = 84 Top = 1 Width = 82 Height = 22 Caption = 'Close' Flat = True Transparent = False OnClick = btCloseClick end object RefreshRecord: TSpeedButton Left = 408 Top = 1 Width = 82 Height = 22 Caption = 'RefreshRecord' Flat = True Transparent = False OnClick = RefreshRecordClick end object Panel1: TPanel Left = 1 Top = 47 Width = 368 Height = 52 BevelOuter = bvNone Color = clButton ParentColor = False TabOrder = 0 object Label2: TLabel Left = 5 Top = 5 Width = 41 Height = 19 Caption = 'Updates' Font.Color = clMaroon Font.Height = 11 Font.Name = 'MS Sans Serif' Font.Pitch = fpVariable Font.Style = [fsBold] ParentFont = False end object Panel3: TPanel Left = 20 Top = 23 Width = 333 Height = 24 BevelOuter = bvNone Color = 16591631 ParentColor = False TabOrder = 0 object btApply: TSpeedButton Left = 1 Top = 1 Width = 82 Height = 22 Caption = 'Apply' Flat = True Font.Color = clMaroon Font.Height = 11 Font.Name = 'MS Sans Serif' Font.Pitch = fpVariable Font.Style = [fsBold] ParentFont = False Transparent = False OnClick = btApplyClick end object btCommit: TSpeedButton Left = 84 Top = 1 Width = 82 Height = 22 Caption = 'Commit' Flat = True Font.Color = clMaroon Font.Height = 11 Font.Name = 'MS Sans Serif' Font.Pitch = fpVariable Font.Style = [fsBold] ParentFont = False Transparent = False OnClick = btCommitClick end object btCancel: TSpeedButton Left = 167 Top = 1 Width = 82 Height = 22 Caption = 'Cancel' Flat = True Font.Color = clMaroon Font.Height = 11 Font.Name = 'MS Sans Serif' Font.Pitch = fpVariable Font.Style = [fsBold] ParentFont = False Transparent = False OnClick = btCancelClick end object btRevertRecord: TSpeedButton Left = 250 Top = 1 Width = 82 Height = 22 Caption = 'Revert' Flat = True Font.Color = clMaroon Font.Height = 11 Font.Name = 'MS Sans Serif' Font.Pitch = fpVariable Font.Style = [fsBold] ParentFont = False Transparent = False OnClick = btRevertRecordClick end end end object Panel2: TPanel Left = 1 Top = 24 Width = 317 Height = 22 BevelOuter = bvNone Color = clButton ParentColor = False TabOrder = 1 object Label4: TLabel Left = 220 Top = 5 Width = 49 Height = 18 Caption = 'Batch Size' end object cbCachedUpdates: TCheckBox Left = 8 Top = 4 Width = 97 Height = 12 Caption = 'CachedUpdates' TabOrder = 0 OnClick = cbCachedUpdatesClick end object cbCustomUpdate: TCheckBox Left = 113 Top = 4 Width = 97 Height = 14 Caption = 'Custom Update' TabOrder = 1 OnClick = cbCustomUpdateClick end object edUpdateBatchSize: TEdit Left = 276 Top = 1 Width = 37 Height = 26 TabOrder = 2 Text = '1' end end object Panel4: TPanel Left = 370 Top = 47 Width = 296 Height = 52 BevelOuter = bvNone Color = clButton ParentColor = False TabOrder = 2 object Label3: TLabel Left = 5 Top = 5 Width = 65 Height = 19 Caption = 'Transactions' Font.Color = clNavy Font.Height = 11 Font.Name = 'MS Sans Serif' Font.Pitch = fpVariable Font.Style = [fsBold] ParentFont = False end object Panel5: TPanel Left = 24 Top = 23 Width = 250 Height = 24 BevelOuter = bvNone Color = 16591631 ParentColor = False TabOrder = 0 object btStartTrans: TSpeedButton Left = 1 Top = 1 Width = 82 Height = 22 Caption = 'Start' Flat = True Font.Color = clNavy Font.Height = 11 Font.Name = 'MS Sans Serif' Font.Pitch = fpVariable Font.Style = [fsBold] ParentFont = False Transparent = False OnClick = btStartTransClick end object btCommitTrans: TSpeedButton Left = 84 Top = 1 Width = 82 Height = 22 Caption = 'Commit' Flat = True Font.Color = clNavy Font.Height = 11 Font.Name = 'MS Sans Serif' Font.Pitch = fpVariable Font.Style = [fsBold] ParentFont = False Transparent = False OnClick = btCommitTransClick end object btRollBackTrans: TSpeedButton Left = 167 Top = 1 Width = 82 Height = 22 Caption = 'Rollback' Flat = True Font.Color = clNavy Font.Height = 11 Font.Name = 'MS Sans Serif' Font.Pitch = fpVariable Font.Style = [fsBold] ParentFont = False Transparent = False OnClick = btRollbackTransClick end end end object Panel6: TPanel Left = 319 Top = 24 Width = 347 Height = 22 BevelOuter = bvNone Color = clButton ParentColor = False TabOrder = 3 object Label1: TLabel Left = 6 Top = 3 Width = 59 Height = 18 Caption = 'RecordTypes' end object cbDeleted: TCheckBox Left = 284 Top = 3 Width = 59 Height = 17 Caption = 'Deleted' TabOrder = 0 OnClick = cbDeletedClick end object cbInserted: TCheckBox Left = 221 Top = 3 Width = 61 Height = 17 Caption = 'Inserted' TabOrder = 1 OnClick = cbInsertedClick end object cbModified: TCheckBox Left = 155 Top = 3 Width = 61 Height = 17 Caption = 'Modified' TabOrder = 2 OnClick = cbModifiedClick end object cbUnmodified: TCheckBox Left = 77 Top = 3 Width = 76 Height = 17 Caption = 'Unmodified' TabOrder = 3 OnClick = cbUnmodifiedClick end end object Panel7: TPanel Left = 491 Top = 1 Width = 175 Height = 22 BevelOuter = bvNone Color = clButton ParentColor = False TabOrder = 4 end object Panel9: TPanel Left = 167 Top = 1 Width = 240 Height = 22 BevelOuter = bvNone Color = clButton ParentColor = False TabOrder = 5 object DBNavigator: TDBNavigator Left = 0 Top = 1 Width = 240 Height = 22 DataSource = DataSource Flat = True TabOrder = 0 end end end end object DataSource: TDataSource DataSet = MyQuery OnStateChange = DataSourceStateChange OnDataChange = DataSourceDataChange Left = 783 Top = 90 end object MyQuery: TMyQuery SQLInsert.Strings = ( 'INSERT INTO EMP_TRANACTION_SAFE' ' (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)' 'VALUES' ' (:EMPNO, :ENAME, :JOB, :MGR, :HIREDATE, :SAL, :COMM, :DEPTNO)') SQLDelete.Strings = ( 'DELETE FROM EMP_TRANACTION_SAFE' 'WHERE' ' EMPNO = :Old_EMPNO') SQLUpdate.Strings = ( 'UPDATE EMP_TRANACTION_SAFE' 'SET' ' EMPNO = :EMPNO, ENAME = :ENAME, JOB = :JOB, MGR = :MGR, HIREDA' + 'TE = :HIREDATE, SAL = :SAL, COMM = :COMM, DEPTNO = :DEPTNO' 'WHERE' ' EMPNO = :Old_EMPNO') SQLRefresh.Strings = ( 'SELECT EMP_TRANACTION_SAFE.ENAME, EMP_TRANACTION_SAFE.JOB, EMP_T' + 'RANACTION_SAFE.MGR, EMP_TRANACTION_SAFE.HIREDATE, EMP_TRANACTION' + '_SAFE.SAL, EMP_TRANACTION_SAFE.COMM, EMP_TRANACTION_SAFE.DEPTNO ' + 'FROM EMP_TRANACTION_SAFE' 'WHERE' ' EMP_TRANACTION_SAFE.EMPNO = :Old_EMPNO') Connection = MyDACForm.MyConnection SQL.Strings = ( 'SELECT * FROM EMP_TRANACTION_SAFE') CachedUpdates = True OnUpdateError = MyQueryUpdateError OnCalcFields = MyQueryCalcFields Left = 750 Top = 90 endend
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?