DbxMultiForm.pas
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:2k
源码类别:

Delphi控件源码

开发平台:

Delphi

  1. unit DbxMultiForm;
  2. interface
  3. uses
  4.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  5.   Dialogs, SqlExpr, DB, Grids, DBGrids, Provider, DBClient, StdCtrls,
  6.   DBLocal, DBLocalS, DBLocalB, DBTables, DBXpress, FMTBcd, ToolWin,
  7.   DBActns, ActnList, ImgList, ComCtrls, ActnMan, ActnCtrls;
  8. type
  9.   TForm1 = class(TForm)
  10.     SQLConnection1: TSQLConnection;
  11.     SQLDataSet1: TSQLDataSet;
  12.     ClientDataSet1: TClientDataSet;
  13.     DataSetProvider1: TDataSetProvider;
  14.     DataSource1: TDataSource;
  15.     ImageList1: TImageList;
  16.     ActionManager1: TActionManager;
  17.     DataSetFirst1: TDataSetFirst;
  18.     DataSetPrior1: TDataSetPrior;
  19.     DataSetNext1: TDataSetNext;
  20.     DataSetLast1: TDataSetLast;
  21.     DataSetInsert1: TDataSetInsert;
  22.     DataSetDelete1: TDataSetDelete;
  23.     DataSetEdit1: TDataSetEdit;
  24.     DataSetPost1: TDataSetPost;
  25.     DataSetCancel1: TDataSetCancel;
  26.     DataSetRefresh1: TDataSetRefresh;
  27.     ActionToolBar2: TActionToolBar;
  28.     SQLMonitor1: TSQLMonitor;
  29.     PageControl1: TPageControl;
  30.     TabSheet1: TTabSheet;
  31.     DBGrid1: TDBGrid;
  32.     TabSheet2: TTabSheet;
  33.     MemoLog: TMemo;
  34.     SQLDataSet1EMP_NO: TSmallintField;
  35.     SQLDataSet1FIRST_NAME: TStringField;
  36.     SQLDataSet1LAST_NAME: TStringField;
  37.     SQLDataSet1PHONE_EXT: TStringField;
  38.     SQLDataSet1HIRE_DATE: TSQLTimeStampField;
  39.     SQLDataSet1DEPT_NO: TStringField;
  40.     SQLDataSet1JOB_CODE: TStringField;
  41.     SQLDataSet1JOB_GRADE: TSmallintField;
  42.     SQLDataSet1JOB_COUNTRY: TStringField;
  43.     SQLDataSet1SALARY: TFMTBCDField;
  44.     SQLDataSet1FULL_NAME: TStringField;
  45.     procedure FormCreate(Sender: TObject);
  46.     procedure DoUpdate(DataSet: TDataSet);
  47.     procedure SQLMonitor1LogTrace(Sender: TObject; CBInfo: pSQLTRACEDesc);
  48.   private
  49.   protected
  50.     { Private declarations }
  51.   public
  52.     { Public declarations }
  53.   end;
  54. var
  55.   Form1: TForm1;
  56. implementation
  57. {$R *.DFM}
  58. procedure TForm1.FormCreate(Sender: TObject);
  59. begin
  60.   ClientDataSet1.Open;
  61. end;
  62. procedure TForm1.DoUpdate(DataSet: TDataSet);
  63. begin
  64.   ClientDataSet1.ApplyUpdates(0);
  65. end;
  66. procedure TForm1.SQLMonitor1LogTrace(Sender: TObject;
  67.   CBInfo: pSQLTRACEDesc);
  68. begin
  69.   MemoLog.Lines.Add (CBInfo.pszTrace);
  70. end;
  71. end.