Partager via


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

'Declaration
Protected Overridable Function ToTestString As String
protected virtual string ToTestString()
protected:
virtual String^ ToTestString()
abstract ToTestString : unit -> string  
override ToTestString : unit -> string
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.

.NET Framework Security

See Also

Reference

AdoDotNetConnectionProperties Class

Microsoft.VisualStudio.Data.AdoDotNet Namespace