data.pas
上传用户:blmaxia
上传日期:2010-02-17
资源大小:657k
文件大小:1k
- unit data;
- interface
- uses
- SysUtils, Classes, ADODB, DB, main;
- type
- TDataModuleADO = class(TDataModule)
- ADOConnection1: TADOConnection;
- ADOTable1: TADOTable;
- ADOQuery1: TADOQuery;
- procedure DataModuleCreate(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- DataModuleADO: TDataModuleADO;
- implementation
- {$R *.dfm}
- procedure TDataModuleADO.DataModuleCreate(Sender: TObject);
- begin
- adoconnection1.ConnectionString :='Provider=Microsoft.Jet.OLEDB.4.0;User ID=admin;Data Source='
- +mypath+'databookmanage.mdb;Persist Security Info=False';
- adoquery1.Connection :=adoconnection1;
- adotable1.Connection :=adoconnection1;
- end;
- end.