AdoDotNetConnectionProperties.ToTestString Method

Retrieves a form of the connection string that can be used for testing the connection.

Namespace:  Microsoft.VisualStudio.Data.AdoDotNet
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)

Syntax

'宣言
Protected Overridable Function ToTestString As String
'使用
Dim returnValue As String

returnValue = Me.ToTestString()
protected virtual string ToTestString()
protected:
virtual String^ ToTestString()
protected function ToTestString() : String

Return Value

Type: System.String

Returns a testable form of the connection string.

Remarks

The AdoDotNetConnectionProperties class implements the Test method by calling the DbProviderFactory class for the ADO.NET provider to create a connection, and then generically sets its connection string and tries to open the connection.

A DDEX provider may wish to use a slightly different form of the string at testing time (for example, disabling pooling), in which case they should override this method. The base implementation simply returns ToFullString.

Permissions

See Also

Reference

AdoDotNetConnectionProperties Class

AdoDotNetConnectionProperties Members

Microsoft.VisualStudio.Data.AdoDotNet Namespace