對於BDE會話期對象來說
但是作者往往等到要發布程序時才發現
AddAlias用於為Paradox
AddStandardAlias函數則需要傳遞三個參數
procedure TForm
begin
with Session do
begin
ConfigMode := cmSession;
try
AddStandardAlias(WorkMen
finally
ConfigMode := cmAll;
end;
end;
end;
上面的是單機版的創建別名方法
procedure TForm
var MyList: TStringList;
begin
MyList := TStringList
try
with MyList do
begin
Add(SERVER NAME=IB_SERVER:/PATH/DATABASE
Add(USER NAME=MYNAME);
end;
Session
finally
MyList
end;
end;
要說明的是
From:http://tw.wingwit.com/Article/program/Delphi/201311/24716.html