dotConnect for SQLite Documentation
Devart.Common Namespace / DbDump Class / Backup Method / Backup(String) Method
The name of the file to write the script to.
Example

In This Topic
    Backup(String) Method
    In This Topic
    Generates a script and writes it to the specified file.
    Syntax
    'Declaration
     
    Public Overloads Sub Backup( _
       ByVal fileName As String _
    ) 
    public void Backup( 
       string fileName
    )

    Parameters

    fileName
    The name of the file to write the script to.
    Example
    This sample demonstrates performing async backup and restore operations.
    public void DumpIt(SQLiteConnection conn)
    {
            conn.Open();
            SQLiteDump sqSqlDump = new SQLiteDump();
            sqSqlDump.Connection = conn;
            sqSqlDump.IncludeDrop = true;
            sqSqlDump.Backup("d:\\dump.dmp");
            conn.Close();
    }
    
    public void UnDumpIt(SQLiteConnection conn)
    {
            conn.Open();
            SQLiteDump sqSqlDump = new SQLiteDump();
            sqSqlDump.Connection = conn;
            sqSqlDump.Restore("d:\\dump.dmp");
            conn.Close();
    }
    Public Sub DumpIt(conn As SQLiteConnection)
            conn.Open()
            Dim sqSqlDump As New SQLiteDump()
            sqSqlDump.Connection = conn
            sqSqlDump.IncludeDrop = True
            sqSqlDump.Backup("d:\dump.dmp")
            conn.Close()
    End Sub
    
    Public Sub UnDumpIt(conn As SQLiteConnection)
            conn.Open()
            Dim sqSqlDump As New SQLiteDump()
            sqSqlDump.Connection = conn
            sqSqlDump.Restore("d:\dump.dmp")
            conn.Close()
    End Sub
    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