Reputation: 111
I have downloaded the SQLITE amalgamation folder along with the entire source code.
Followed the steps mentioned here http://www.sqlite.org/src/doc/trunk/ext/userauth/user-auth.txt
Using the following command to build the sqlite3.exe
cl -D_SQLITE_USER_AUTHENTICATION shell.c sqlite3.c userauth.c -Fesqlite3.exe
But i can still open the database with sqlite3_open_v2. No authentication is required.
Upvotes: 3
Views: 4480
Reputation: 111
Steps I followed to add User authentication
//Steps 2 and 3 cause i wanted just 1 source and header file.
Copy sqlite3userauth.h to sqlite3.h
cl -DSQLITE_USER_AUTHENTICATION shell.c sqlite3.c -Fesqlite3.exe
.open Test.db
PRAGMA writable_schema = 1
.user add User User123 1
//.user add Username Password IsAdminUpvotes: 2