Udostępnij za pośrednictwem


ConnectionInfoBase.ConnectionParmsChanged Method

When overridden in a derived class, enables you to specify custom actions when a connection parameter changes.

Namespace: Microsoft.SqlServer.Management.Common
Assembly: Microsoft.SqlServer.ConnectionInfo (in microsoft.sqlserver.connectioninfo.dll)

Syntax

'Deklaracja
Protected MustOverride Sub ConnectionParmsChanged
protected abstract void ConnectionParmsChanged ()
protected:
virtual void ConnectionParmsChanged () abstract
protected abstract void ConnectionParmsChanged ()
protected abstract function ConnectionParmsChanged ()

Remarks

SQL Server calls this method when any of the following parameters change on an open connection:

  • ServerName

  • SqlConnection

  • UserName

  • Password and SecurePassword

  • UseIntegratedSecurity

  • DatabaseName

  • ConnectionTimeout

In Integration Services, changes to the following parameters also initiate a call to this method:

  • ApplicationName

  • WorkstationID

In SQL Server Compact 3.5, changes to the following parameters also initiate a call to this method:

  • MaxDatabaseSize

  • DefaultLockEscalation

Standard SQL Server connection classes, such as SqlConnectionInfo, provide a default implementation of this method, which then rebuilds the connection string. If you are creating your own connection class based on ConnectionInfoBase, you must override this method and implement your own logic for handling connection parameter changes.

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server.

Target Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server.