devbean / QtCipherSqlitePlugin

A Qt plugin for cipher SQLite.
http://qtciphersqliteplugin.galaxyworld.org
GNU Lesser General Public License v2.1
392 stars 159 forks source link

Password not working #23

Closed MrLibya closed 5 years ago

MrLibya commented 5 years ago

Hello I'm using Qt 5.11.2 and i've edit CODEC_TYPE to CODEC_TYPE_AES128 so i can use it with navicat ! , then i compiled the library and add it to sqldrivers and i check the drivers: ("QSQLITE", "QMYSQL", "QMYSQL3", "QODBC", "QODBC3", "QPSQL", "QPSQL7", "SQLITECIPHER")

my code: const QString dbLocation = QApplication::applicationDirPath()+ QDir::separator() + "SalesManagement.db"; QSqlDatabase db = QSqlDatabase::addDatabase("SQLITECIPHER"); db.setDatabaseName(dbLocation); db.setPassword("It_es_g"); if(!db.open()) { DBFailMsg(); return 1; }

then i tryed to open an already sqlite db with aes128 enc but it's not open , then i tryed to make new db throw the same code with password and it's being created but without password !

so what's the problem ?

MrLibya commented 5 years ago

ok i've changed the SQLITE_HAS_CODEC=1 to SQLITE_HAS_CODEC and it's worked !