请问如何设定数据库的相对路径? 谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如用ADO的话,可在ADOCONNECTION中设置。 一般是这样定的procedure TForm1.Button1Click(Sender: TObject);var spath : String;begin sPath := ExtractFilePath(Application.ExeName) + 'db1.mdb'; adotable1.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + sPath + ';Persist Security Info=False';end; 当然: 上一层目录可把spath改为'..\db1.mdb'; 下一层目录可把spath改为'子目录\db1.mdb'; 那个啥,叫DirectUI的,delphi不是很早就有了这种做法了吗? active desktop(活动桌面)在线等待 WebBrowser1自动电击按扭疑问 小问题快赚分啦!急!!! 如何把图标加到状态栏里面 服务程序怎么样自动安装 请教,为什么这样不对 一个窗体里如何实现“分层”的效果??? 在delphi中怎样从一个快捷方式(也就是*.lnk)中得到该快捷方式的可执行文件 DbGrid的OnDrawColumnCell事件? delphi新手,编译好的exe文件在其它机器上运行时,需要哪些文件? 如何解决莫名其妙的BOF或EOF错误
procedure TForm1.Button1Click(Sender: TObject);
var
spath : String;
begin
sPath := ExtractFilePath(Application.ExeName) + 'db1.mdb';
adotable1.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + sPath + ';Persist Security Info=False';
end;
下一层目录可把spath改为'子目录\db1.mdb';