Browse Source

* Password check for sqlite3 functionality, Mantis #18774

git-svn-id: trunk@20535 -
marco 13 years ago
parent
commit
56442144bf
1 changed files with 2 additions and 0 deletions
  1. 2 0
      packages/fcl-db/src/sqldb/sqlite/sqlite3conn.pp

+ 2 - 0
packages/fcl-db/src/sqldb/sqlite/sqlite3conn.pp

@@ -719,6 +719,8 @@ begin
   InitializeSqlite(SQLiteLibraryName);
   str1:= databasename;
   checkerror(sqlite3_open(pchar(str1),@fhandle));
+  if (Length(Password)>0) and assigned(sqlite3_key) then
+    checkerror(sqlite3_key(fhandle,PChar(Password),StrLen(PChar(Password))));
   if Params.IndexOfName('foreign_keys') <> -1 then
     execsql('PRAGMA foreign_keys =  '+Params.Values['foreign_keys']);
 end;