LobSystemInstance.CurrentConnection 属性 (Microsoft.Office.Server.ApplicationRegistry.MetadataModel)

Gets the current connection to the business application.

命名空间: Microsoft.Office.Server.ApplicationRegistry.MetadataModel
程序集: Microsoft.SharePoint.Portal (在 microsoft.sharepoint.portal.dll 中)

语法

声明
Public ReadOnly Property CurrentConnection As Object
用法
Dim instance As LobSystemInstance
Dim value As Object

value = instance.CurrentConnection
public Object CurrentConnection { get; }

属性值

An object.

备注

Business Data clients can use two forms of connection management:

1. Explicit connection management

2. Implicit connection management

Explicit connection management is more complex but is useful and performant when sharing connections. For example, if three Business Data web parts want to share a connection to a backend and query it sequentially, implicit connection management would open and close a connection in each case. It is better to explicitly open a connection using LobSystemInstance.OpenConnection(), make the 3 Business Data Catalog object model calls from the 3 Business Data web parts and then close the connection. CurrentConnection allows checking for whether a connection is currently open.

另请参阅

参考

LobSystemInstance 类
LobSystemInstance 成员
Microsoft.Office.Server.ApplicationRegistry.MetadataModel 命名空间