| Статистика |
Онлайн всего: 1 Гостей: 1 Пользователей: 0 |
|
| Мой сайт |
 |
Создание алиасов в Delphi
Код:
- procedure CheckAlias(const AliasName, AliasType, AliasPath: String);
-
- var
- SList: TStrings;
- i: Integer;
- AliasFound: Boolean;
- begin
-
- try
- SList := TStringList.Create;
- Session.GetAliasNames(SList);
- AliasFound := False;
- for i:=0 to SList.Count-1 do
- if SList=AliasName then
- begin
- AliasFound := True;
- break;
- end;
- finally
- SList.Free;
- end;
- if AliasFound then
- begin
- try
- SList := TStringList.Create;
- Session.GetAliasParams(AliasName,SList);
-
- if SList[0]< > ′PATH=′+AliasPath then
- begin
- SList[0] := ′PATH=′+AliasPath;
- Session.ModifyAlias(AliasName,SList);
- end;
- finally
- SList.Free;
- end;
- end
- else
- Session.AddStandardAlias(AliasName,AliasPath,AliasType);
- Session.SaveConfigFile;
- end;
Источник: http://delphisources.at.ua/publ/bazy_dannykh/alias/sozdanie_aliasov_v_delphi/33-1-0-75# |
| Категория: Базы данных | Добавил: maxim-pogasim (03.09.2015)
|
| Просмотров: 400
| Теги:
| Рейтинг: 0.0/0 |
|
|