Board index » off-topic » Changing the bde path during runtime

Changing the bde path during runtime


2004-01-12 02:48:06 PM
off-topic19
Hi
I'm trying to change the BDE path at runtime, however, unless I close and
reopen the application I won't be able to see the changes. The strange thing
is that from the BDE administrator, the changes are visible immediately.
Below, I pasted the code I'm using. Any help is welcome.
Try
AParams:= TStringList.Create;
AParams.Clear;
AParams.add('Path=' + AgentsPath + iComDir + '\');
AParams.add('Default Driver=' + DefaultDriver);
Try
Session.AddAlias('Clients', ConnectionType, AParams);
Except
Session.ModifyAlias('Clients', AParams);
End;
Finally
Session.SaveConfigFile;
AParams.Free;
End;
Regards
Brian
 
 

Re:Changing the bde path during runtime

Thanks Bill. It worked.
"Bill Todd (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote
Try

Session.Close;
Session.Open;

after you make the change.

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)