dotConnect for SQLite Documentation
Devart.Data.SQLite Namespace / SQLiteConnection Class / SQLCipherExport Method
Path to save the result encrypted database to.
The password to use for the encrypted database. Passing an empty string creates an unencrypted database.
Example

SQLCipherExport Method
Creates an SQLCipher-encrypted copy of the current unencrypted database. You must have the SQLite3.dll library with SQLCipher extension in order to use this method.
Syntax
'Declaration
 
Public Sub SQLCipherExport( _
   ByVal destDatabaseFile As String, _
   ByVal destDatabasePassword As String _
) 
 

Parameters

destDatabaseFile
Path to save the result encrypted database to.
destDatabasePassword
The password to use for the encrypted database. Passing an empty string creates an unencrypted database.
Remarks

Note that after executing this method, the connection is still connected to the original unencrypted database. You need to manually reconnect to the result encrypted database if you want to work with it.

To create an unencrypted copy of a SQLCipher-encrypted database, call this method for it with an empty password.

Example
This example opens an unencrypted database and creates a SQLCipher-encrypted copy with the password "11111" in the same folder.
using (var conn = new SQLiteConnection()) {

    conn.ConnectionString = @"Data Source=D:\databaseOld.db;Encryption = SQLCipher;";
    conn.Open();
    conn.SQLCipherExport(@"D:\databaseNew.db", "11111");
}
Using conn = New SQLiteConnection()

        conn.ConnectionString = "Data Source=D:\databaseOld.db;Encryption = SQLCipher;"
        conn.Open()
        conn.SQLCipherExport("D:\databaseNew.db", "11111")
End Using
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