我正在努力寻找使用密码保护 sqlite 数据库的解决方案。我正在尝试使用 SQLiteCrypt。我按照链接的说明进行操作!,但是当我输入时;
sqlite3_open_v2("data.db", &db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
我得到:错误:“sqlite3_open_v2”附近:语法错误。有人可以帮忙吗?
D:\>sqlite.exe data.db
SQLite version 3.7.15.2 2013-01-09 11:53:05
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> PRAGMA lic = '77523-009-0000007-72328';
sqlite> PRAGMA rekey = 'ac23';
sqlite> .exit
你必须先退出才能看到效果!
D:\>sqlite.exe data.db
SQLite version 3.7.15.2 2013-01-09 11:53:05
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select * from _MapPropertyA;
Error: file is encrypted or is not a database
完成,您的数据库文件已加密