DatabaseProvider..::.GetDatabaseHostName Method Home
.NET Framework Class Library
DatabaseProvider..::.GetDatabaseHostName Method

Returns the host name of the computer where the database in the connection string is located.

Namespace:  Microsoft.Web.Management.DatabaseManager
Assembly:  Microsoft.Web.Management.DatabaseManager (in Microsoft.Web.Management.DatabaseManager.dll)
Syntax

'Usage

Dim instance As DatabaseProvider
Dim connectionString As String
Dim returnValue As String

returnValue = instance.GetDatabaseHostName(connectionString)

'Declaration

Public MustOverride Function GetDatabaseHostName ( _
    connectionString As String _
) As String

Parameters

connectionString
Type: System..::.String
The connection string for the database connection.

Return Value

Type: System..::.String
A string that contains the host name for the computer where the database is located.
Remarks

Your provider must implement the GetDatabaseHostName method in order to return the host name of the computer that is hosting the database for your provider.

Examples

The following code sample illustrates an example GetDatabaseHostName method that returns the host name of the database.


    Public Overrides Function GetDatabaseHostName( _
            ByVal connectionString As String) As String

        Return System.Environment.MachineName

    End Function



Permissions

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .
See Also

Reference

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View