How to get the path from an alias 
Author Message
 How to get the path from an alias
Hi All,

I have an database in paradox and I use an alias for that.
Now I wonder how do I get the path for the alias in delphi.



Fri, 25 Jun 2004 22:09:41 GMT
 How to get the path from an alias

Quote:

> Hi All,

> I have an database in paradox and I use an alias for that.
> Now I wonder how do I get the path for the alias in delphi.

Read Database.Params strings


Sat, 26 Jun 2004 14:52:47 GMT
 How to get the path from an alias




Quote:
> > Hi All,

> > I have an database in paradox and I use an alias for that.
> > Now I wonder how do I get the path for the alias in delphi.

> Read Database.Params strings

Yes, but how?


Sun, 27 Jun 2004 14:54:30 GMT
 How to get the path from an alias
1. read a list of parameters:
Session.GetAliasParams(strAliasName, lstAliasParams);
where lstAliasParams is a TStrings (for example  yourCombobox.Items)

2. edDirectory.Text := lstAliasParams.Values['PATH'];

--
With best regards, Mike Shkolnik


WEB: http://www.scalabium.com



Quote:





> > > Hi All,

> > > I have an database in paradox and I use an alias for that.
> > > Now I wonder how do I get the path for the alias in delphi.

> > Read Database.Params strings

> Yes, but how?



Sun, 27 Jun 2004 21:10:11 GMT
 How to get the path from an alias
Thank You.


Sun, 27 Jun 2004 23:22:01 GMT
 How to get the path from an alias
function GetAliasPath(const AliasName: string): string;
var
  SAlias: DBINAME;
  Desc: DBDesc;
  Params: TStrings;
begin
  Result := '';
  StrPLCopy(SAlias, AliasName, SizeOf(SAlias) - 1);
  AnsiToOem(SAlias, SAlias);

  if StrIComp(Desc.szDbType, szCFGDBSTANDARD) = 0 then begin
    OemToAnsi(Desc.szPhyName, Desc.szPhyName);
    Result := StrPas(Desc.szPhyName);
  end
  else begin
    Params := TStringList.Create;
    try
{$IFDEF WIN32}
      Session.Active := True;
{$ENDIF}
      Session.GetAliasParams(AliasName, Params);
      Result := Params.Values['SERVER NAME'];
    finally
      Params.Free;
    end;
  end;
end;


Quote:
> Thank You.



Mon, 28 Jun 2004 19:19:24 GMT
 
 [ 6 post ] 

 Relevant Pages 

1. Getting HDD-Path by Alias

2. Getting Long File Path from short Path / File Name

3. how to get BDE Alias path

4. Alias Path?

5. Change path of BDE-alias at run-time

6. Alias path

7. Different access path when going through alias?

8. Extracting path from BDE alias or database?

9. Help needed.......creating aliases for database paths??????

10. Reading Path to an Alias

11. gettting BDE alias path

12. Retrieve Alias Path?


 
Powered by phpBB® Forum Software