Share via


DatabaseProvider.GetDatabaseInfo Method

Returns database-specific information for the database provider.

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

Syntax

'Declaration
Public MustOverride Function GetDatabaseInfo ( _
    connectionString As String _
) As DatabaseInfo
'Usage
Dim instance As DatabaseProvider
Dim connectionString As String
Dim returnValue As DatabaseInfo

returnValue = instance.GetDatabaseInfo(connectionString)
public abstract DatabaseInfo GetDatabaseInfo(
    string connectionString
)
public:
virtual DatabaseInfo^ GetDatabaseInfo(
    String^ connectionString
) abstract
public abstract function GetDatabaseInfo(
    connectionString : String
) : DatabaseInfo

Parameters

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

Return Value

Type: Microsoft.Web.Management.DatabaseManager.DatabaseInfo
A DatabaseInfo object.

Remarks

Your provider must implement the GetDatabaseInfo method in order to return connection-specific information about a database.

Examples

The following code sample illustrates an example GetDatabaseInfo method that returns a DatabaseInfo object that identifies the database provider for schema support.


    Public Overrides Function GetDatabaseInfo( _
            ByVal connectionString As String) _
            As Microsoft.Web.Management.DatabaseManager.DatabaseInfo

        Dim info As DatabaseInfo = New DatabaseInfo
        info.SupportsSchemas = True
        Return info

    End Function


        public override DatabaseInfo GetDatabaseInfo(
            string connectionString )
        {
            DatabaseInfo info = new DatabaseInfo();
            info.SupportsSchemas = true;
            return info;
        }

Permissions

See Also

Reference

DatabaseProvider Class

Microsoft.Web.Management.DatabaseManager Namespace