LinqConnect Documentation
Devart.Data.Linq Namespace / DataContext Class / DeleteDatabase Method / DeleteDatabase(Boolean,Boolean) Method
If set to true, SQL execution errors will be ignored.

If set to true, the behaviour is the following:


In This Topic
    DeleteDatabase(Boolean,Boolean) Method
    In This Topic
    Creates and executes script that deletes database tables with their constraints, indexes, and foreign keys.
    Syntax
    'Declaration
     
    Public Overloads Function DeleteDatabase( _
       ByVal ignoreErrors As Boolean, _
       ByVal deleteSchema As Boolean _
    ) As Boolean
    public bool DeleteDatabase( 
       bool ignoreErrors,
       bool deleteSchema
    )

    Parameters

    ignoreErrors
    If set to true, SQL execution errors will be ignored.
    deleteSchema

    If set to true, the behaviour is the following:

    • DROP DATABASE statement is generated for SQL Server.
    • DROP DATABASE statement is generated for MySQL.
    • DROP SCHEMA statement is generated for PostgreSQL.
    • DROP USER statement is generated Oracle.
    • the database file is removed from file system in case of SQLite.

    Return Value

    False, if there were errors during execution; true, otherwise.
    Remarks

    The name of the database is derived from the connection.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also