procedure TForm1.ChangeAlias;var
AParams: TStringList;
Dir: string;
begin
if not Session.IsAlias('MyAlias') then
begin
ShowMessage('Alias MyAlias does not exist');
Exit;
end;
AParams := TStringList.Create;
try
// get the current PATH parameter
Session.GetAliasParams('MyAlias',AParams);
Dir := Copy(AParams.Strings[0],6,255);
// get the new PATH parameter
if InputQuery('MyAlias Alias Path','Path:' ,Dir) then begin
// Update the alias parameters
AParams.Clear;
AParams.Add('PATH=' + Dir);
Session.ModifyAlias('MyAlias',AParams);
Session.SaveConfigFile;
end;
finally
AParams.Free;
end;
end;
AParams: TStringList;
Dir: string;
begin
if not Session.IsAlias('MyAlias') then
begin
ShowMessage('Alias MyAlias does not exist');
Exit;
end;
AParams := TStringList.Create;
try
// get the current PATH parameter
Session.GetAliasParams('MyAlias',AParams);
Dir := Copy(AParams.Strings[0],6,255);
// get the new PATH parameter
if InputQuery('MyAlias Alias Path','Path:' ,Dir) then begin
// Update the alias parameters
AParams.Clear;
AParams.Add('PATH=' + Dir);
Session.ModifyAlias('MyAlias',AParams);
Session.SaveConfigFile;
end;
finally
AParams.Free;
end;
end;
解决方案 »
- 谁做过网页客服系统,问个问题
- 远程采用何种技术为好?????????
- 关于数据上传
- 关于TStrings/TStringList的问题
- 关于database的params设置的问题!(waiting on line......)
- 为什么在Delphi7中没有了TClentSocket和TServerSocket了呢
- 象杀毒软件那样,能够扫描整个硬盘,找到指定文件后再删除应该如何实现呀?
- 怎样实现asp和activeForm之间的参数传递!!!
- 关于delphi控制Foxpro产生的一系列问题请教大家高分
- 有关数据库动态密码的设计
- 有关于COM+对象对SQL数据库有自增字段ID进行更新时的错误
- 对这个程序实现上大家有什么想法?
var
MyList: TStringList;
begin
MyList := TStringList.Create;
try
with MyList do
begin
Add('PATH=你的数据库的路径');
Add('ENABLE BCD=FALSE');
end;
Session.AddAlias('你的数据库别名', 'PARADOX', MyList);
finally
MyList.Free;
end;
end; { SetAlias }