OpenSchemaU1.pas
资源名称:delphi.rar [点击查看]
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:1k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit OpenSchemaU1;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, ExtCtrls, DB, ADODB, Grids, DBGrids;
- type
- TForm1 = class(TForm)
- DBGrid1: TDBGrid;
- ADOConnection1: TADOConnection;
- DataSource1: TDataSource;
- ADODataSet1: TADODataSet;
- Panel1: TPanel;
- Button1: TButton;
- Button2: TButton;
- procedure Button1Click(Sender: TObject);
- procedure Button2Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.dfm}
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- ADOConnection1.OpenSchema(siPrimaryKeys, EmptyParam, EmptyParam, ADODataSet1);
- end;
- procedure TForm1.Button2Click(Sender: TObject);
- var
- Filter: OLEVariant;
- begin
- Filter:=VarArrayCreate([0, 2], varVariant);
- Filter[2]:='CUSTOMERS';
- ADOConnection1.OpenSchema(siPrimaryKeys, Filter, EmptyParam, ADODataSet1);
- end;
- end.