Im build wxwidget version 3.0.2 and wxsqlite3 3.3.1 with Visual Studio.
I have created a database with encryption wxsqlite3 . But when using other programs (ex: Navicat) to read them then receive the error message "file is encrypted or is not a database".
When i try query again with wxsqlite3 or sqlite3_shell then still query data correct.
Code: Select all
wxString dbFile = wxString();
wxString dbKey = wxString(wxT("Abc123@"));
wxString pwdQuery;
wxSQLite3Database::InitializeSQLite();
wxSQLite3Database db;
db.Open("Main.db");
string sql = "Create table test(column_a);";
string sql1 = "Insert into test values('Test data');";
db.ExecuteUpdate(sql);
db.ExecuteUpdate(sql1);
db.ReKey(dbKey);
string sqlquery = "Select * from test;";
db.Close();
wxSQLite3Database::ShutdownSQLite();