ConnectionInfoBase.ConnectionParmsChanged 方法

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

命名空间:  Microsoft.SqlServer.Management.Common
程序集:  Microsoft.SqlServer.ConnectionInfo(在 Microsoft.SqlServer.ConnectionInfo.dll 中)

语法

声明
Protected MustOverride Sub ConnectionParmsChanged
用法
Me.ConnectionParmsChanged()
protected abstract void ConnectionParmsChanged()
protected:
virtual void ConnectionParmsChanged() abstract
abstract ConnectionParmsChanged : unit -> unit
protected abstract function ConnectionParmsChanged()

注释

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.

请参阅

参考

ConnectionInfoBase 类

Microsoft.SqlServer.Management.Common 命名空间