wrench你用的什么数据库?现在多用ado了,比较方便的说
下面的例子是delphi带的,能够显示table所在目录。dataBase的我想也是要
从类似的BDE api下手
例子中提到一个BDE.hlp,我找了找没找到。今天经理坐镇催促手头的这个项目,
你自己先试着解决,下星期还没解决咱么再讨论
This example uses the DBHandle property to make a call to
the DbiGetDirectory BDE API function. Because it uses a BDE API
function directly, you must add uses BDE; in the implementation
section of the unit.
procedure TForm1.Button1Click(Sender: TObject);
var
Directory: String;
begin
SetLength(Directory, 250);
if DbiGetDirectory(Table1.DBHandle, True, PChar(Directory)) <> dbiErr_None then
MessageDlg('Error getting default directory', mtError, [mbOk], 0)
else
ShowMessage('Default directory = ' + Directory);
if DbiGetDirectory(Table1.DBHandle, False, PChar(Directory)) <> dbiErr_None then
MessageDlg('Error getting current working directory', mtError, [mbOk], 0)
else
ShowMessage('Current working directory = ' + Directory);
end;