Criando Alias em Run Time
Estou criando um alias do Interbase em tempo de execução, só que quando adiciono o LangDriver como ´Borland PTG Latin-1´ ele até altera o alias para mim no BDE só que não faz nenhum efeito. E quando o LangDriver pelo o proprio BDE ele funciona de forma normal.
Segue o exemplo:
var
a : TStringList;
begin
try
if not Session.Active then
begin
Session.Active := True;
a := TStringList.Create;
a.Add(´LANGDRIVER=Borland PTG Latin-1´ );
a.Add(´SERVER NAME=C:\Temp\RESTAURANTE.GDB´ );
//Session.ConfigMode := [cfmVirtual, cfmPersistent];
if not Session.IsAlias(´Alias´) then
begin
Session.AddAlias( ´OUTROS´, ´INTRBASE´, a );
Session.SaveConfigFile;
end;
Session.Close;;
end
except
end;
end;
Desde já agradeço,
Anderson
Segue o exemplo:
var
a : TStringList;
begin
try
if not Session.Active then
begin
Session.Active := True;
a := TStringList.Create;
a.Add(´LANGDRIVER=Borland PTG Latin-1´ );
a.Add(´SERVER NAME=C:\Temp\RESTAURANTE.GDB´ );
//Session.ConfigMode := [cfmVirtual, cfmPersistent];
if not Session.IsAlias(´Alias´) then
begin
Session.AddAlias( ´OUTROS´, ´INTRBASE´, a );
Session.SaveConfigFile;
end;
Session.Close;;
end
except
end;
end;
Desde já agradeço,
Anderson
Andersoc
Curtidas 0