Board index » delphi » Change BDE alias in run-time ?

Change BDE alias in run-time ?

Quote
t...@ms1.hinet.net (Ivan Chen) writes:
> How to change BDE alias in run-time ?
> I mean change the directory is assigned.

procedure NewDir(NewDir:String)
begin
 Database.Close;
 Database.Params.Values["PATH"] := NewDir;
 Database.OPen;
end;
 

Re:Change BDE alias in run-time ?


The other question, of course, is why?  Since you can set up a temporary
alias by defining a TDatabase component, hook all tables, etc up to that,
and change where it points in one line of code, you don't need to mess
with changing BDE alias connections very often...

Other Threads