Tests a connection string for a database provider.
Assembly: Microsoft.Web.Management.DatabaseManager (in Microsoft.Web.Management.DatabaseManager.dll)
The following code sample illustrates an example TestConnection method that opens and closes a database that will test the connection.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.