相关代码 |
|
unit UntDMAppMDI; interface uses SysUtils, Classes, DB,Forms, ADODB; type TDM = class(TDataModule) ADOConnection: TADOConnection; procedure DataModuleCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var DM: TDM; implementation {$R *.dfm} procedure TDM.DataModuleCreate(Sender: TObject); begin ADOConnection.ConnectionString:='FILE NAME='+Application.GetNamePath+'Connect.udl'; end; end.