[yunqa.de] Re: Problems with PageSize and encryption

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Tue, 17 Feb 2009 18:16:33 +0100

Patrice Monroe Pustavrh wrote:

Problem confirmed and corrected. The fix will be available with the next 
release of DISQLite3.

For the time being, please call sqlite3_rekey only _after_ you set the 
page_size:

  sqlite3_exec_fast(hdb, 'pragma page_size=32768');  
  sqlite3_key(hdb, 'SOMEPASSWORD', strlen(''SOMEPASSWORD''));

Ralf

>I have some nasty problems with DISQlite3 version 2.0.3 (Jan 31st, 2009). If I 
>use pagesize on encrypted database, it fails (access violation).
>For example, code is like this:
> 
>   sqlite3_open_v2(fileName, @hdb,
>      SQLITE_OPEN_READWRITE or SQLITE_OPEN_CREATE, nil);
>    sqlite3_key(hdb, 'SOMEPASSWORD', strlen(''SOMEPASSWORD''));
>    sqlite3_exec_fast(hdb, 'pragma page_size=32768');  
>    sqlite3_exec_fast(hdb, 'CREATE TABLE T1(id integer not null primary key, 
> name varchar(50)');
>    sqlite3_exec_fast(hdb, 'CREATE TABLE T2(id integer not null primary key, 
> name varchar(100)'); // Here access violation occurs

_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: