Board index » delphi » how to get BDE Alias path

how to get BDE Alias path

Hi,

I would like to retrieve the path which belongs to a specified BDE Alias  
name. I tried as described in the online help:

var
  myList: TStrings;
begin
  ...
  Session.GetAliasParams('myAliasName', myList);
  ...
end;

Generally, always when I call one of the TSession methods I get a GPF.

Can you help me?

Michael
--

Michael Suedkamp                                      m...@suedkm.franken.de

 

Re:how to get BDE Alias path


Quote
Michael Suedkamp (m...@suedkm.franken.de) wrote:

: I would like to retrieve the path which belongs to a specified BDE Alias  
: name. I tried as described in the online help:

: var
:   myList: TStrings;
: begin
:   ...
:   Session.GetAliasParams('myAliasName', myList);
:   ...
: end;

: Generally, always when I call one of the TSession methods I get a GPF.

You need to use a TStringList object, not a TStrings object. Further, you
would need to create the TStringList object before accessing it, otherwise
a GPF will result.

  var
    myList: TStringList;
  begin
    myList := TStringList.Create;
    ...
    Session.GetAliasParams('myAlias', myList);
    ...
    myList.Free;
  end;

--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Steve Koterski               _/   The opinions expressed here are    _/
_/ koter...@borland.com         _/         exclusively my own           _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

Other Threads