Const
ADOSTR='Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%S;Persist Security Info=False;Jet OLEDB
atabase Password=????;';
procedure TWebMain.WebModuleCreate(Sender: TObject);
var
dbPath:String;
AppPath:String;
begin
dbPath:=ExtractFilePath(ParamStr(0))+'zlBase.mdb';
AppPath:=ExtractFilePath(ParamStr(0));
ADOBase.Connected:=False;
ADOBase.ConnectionString:=Format(ADOSTR,[dbPath]);
ADOBase.Connected:=True;
ppMain.HTMLFile:=AppPath+'Main.htm';
ppLogin.HTMLFile:=AppPath+'Login.html';
ppAddList.HTMLFile:=AppPath+'addlist.htm';
ppMore.HTMLFile:=AppPath+'List.htm';
ppDetail.HTMLFile:=AppPath+'Detail.htm';
ppEdit.HTMLFile:=AppPath+'editinfo.htm';
end;
动态链接库可以用
Procedure TWebMoudle1.webmoudlecreate(sender:TObject);
var
cbuffer:string[255];
begin
GetModuleFileName(hinstance,@cbuffer,sizeof(cbuffer));
Apppath:=cbuffer;
end;
调用的时候用
ppMain.HtmlFile:=ExctractfilePath(sstr)+'main.htm';
=====================