JetImportExportU1.pas
资源名称:delphi.rar [点击查看]
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:1k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit JetImportExportU1;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, DB, ADODB, ExtCtrls, Grids, DBGrids;
- type
- TForm1 = class(TForm)
- ADOConnection1: TADOConnection;
- Button1: TButton;
- Button2: TButton;
- Button3: TButton;
- ADOTable1: TADOTable;
- DataSource1: TDataSource;
- DBGrid1: TDBGrid;
- Panel1: TPanel;
- Button4: TButton;
- procedure Button1Click(Sender: TObject);
- procedure Button2Click(Sender: TObject);
- procedure Button3Click(Sender: TObject);
- procedure Button4Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.dfm}
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- ADOConnection1.Execute(
- 'SELECT * INTO Customers IN "C:Temp" "Paradox 7.x;" FROM CUSTOMERS');
- end;
- procedure TForm1.Button2Click(Sender: TObject);
- begin
- ADOConnection1.Execute(
- 'SELECT * INTO Customers IN "C:TempNorthwind.xls" "Excel 8.0;" FROM CUSTOMERS');
- end;
- procedure TForm1.Button3Click(Sender: TObject);
- begin
- ADOConnection1.Execute(
- 'SELECT * INTO [Customers.htm] IN "C:Temp" "HTML Export;" FROM CUSTOMERS');
- end;
- procedure TForm1.Button4Click(Sender: TObject);
- begin
- ADOTable1.Open;
- end;
- end.