FireDAC.Comp.Client.TFDCustomConnection.Assign

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: TFDCustomConnection

Delphi

procedure Assign(Source: TPersistent); override;

C++

virtual void __fastcall Assign(System::Classes::TPersistent* Source);

Description

Assigns all the properties of one connection to this connection.

Use the Assign method to copy all the properties and event handlers of one connection to this connection. Assign allows to create a duplicated connection. 

Note: A pooled connection and copied connection are not the same. Pooled connections can be used to improve performance in multi-threaded environment.

Example

oConn := TADConnection.Create(nil);
oConn.Assign(ADConnection1);

See Also