ODAC

TOraSession.AssignConnect Method

Shares database connection between the TOraSession components.

Class

TOraSession

Syntax

procedure AssignConnect(Source: TOraSession); overload;

Parameters
Source
Points to a preconnected session and sets Connected property to True for this instance of TOraSession.

Remarks

Use the AssignConnect method to share database connection between the TOraSession components.

AssignConnect assumes that the Source parameter points to a preconnected session and sets Connected property to True for this instance of TOraSession. Note that AssignConnect doesn't make any references to the Source session. So before disconnecting parent session call AssignConnect(Nil) or Disconnect method for all assigned sessions.

Example

OraSession1.Connect;
OraSession2.AssignConnect(OraSession1); 
                                    // OraSession2.Connected is True
OraSQL.Session := OraSession2;
OraSQL.Execute;
OraSession2.AssignConnect(nil);
                                    // OraSession2.Connected is False
OraSession1.Disconnect; 

See Also

© 1997-2024 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback