FireDAC.Comp.Client.TFDCustomManager.ModifyConnectionDef

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type:
procedure
function
Visibility: public
Source:
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
Unit: FireDAC.Comp.Client
Parent: TFDCustomManager

Delphi

procedure ModifyConnectionDef(const AName: string; AList: TStrings);

C++

void __fastcall ModifyConnectionDef(const System::UnicodeString AName, System::Classes::TStrings* AList);

Description

Modifies the parameters of an existing connection definition.

The ModifyConnectionDef method modifies the parameters of an existing connection definition in the ConnectionDefs list using the AList parameter values. 

After the call, the persistent connection definition is not stored into a file. Call SaveConnectionDefFile to save this and other changes into a file. The connection definition changes that are not stored will be discarded after the FireDAC manager or the application is terminated. 

If the connection definition with the AName name is not found, an exception is raised.

Example

var
  oList: TStringList;
......
  oList := TStringList.Create;
  oList.Add('Server=myhoster');
  FDManager.ModifyConnectionDef('myconn', oList);
  FDManager.SaveConnectionDefFile;

See Also