Hello,

i found the problem.
I have to change the default_cache_size with the pragma, because the cache_size 
will be changed to the default value when the db is closed.
Thank you for your help.
 

>-----Ursprüngliche Nachricht-----
>Von: sqlite-users-boun...@sqlite.org 
>[mailto:sqlite-users-boun...@sqlite.org] Im Auftrag von 
>Koston, Thorsten (ICT)
>Gesendet: Mittwoch, 7. Oktober 2009 10:50
>An: General Discussion of SQLite Database
>Betreff: Re: [sqlite] Problem with PAGE_SIZE and 
>CACHE_SIZEinthe sqlite356c-api
>
>Hi,
>
>thank you for your help.
>Now i can change the page_size and the autovacuum.
>
>But i can't change the cache size.
>It doesn't matter, what a value i enter in the 
>pragma-statement in the sqlite-exec-command.
>The cache_size is always 2000.
>
>Have anybody a idea what i can do?
>
>Thank you in advance!!
>
>
>>-----Ursprüngliche Nachricht-----
>>Von: sqlite-users-boun...@sqlite.org
>>[mailto:sqlite-users-boun...@sqlite.org] Im Auftrag von Roger Binns
>>Gesendet: Mittwoch, 7. Oktober 2009 10:19
>>An: General Discussion of SQLite Database
>>Betreff: Re: [sqlite] Problem with PAGE_SIZE and CACHE_SIZE inthe 
>>sqlite356c-api
>>
>>-----BEGIN PGP SIGNED MESSAGE-----
>>Hash: SHA1
>>
>>> Make a new db-file in the windows explorer.
>>> Open this file in the console with sqlite3 db-file.
>>> Then set the page_size and the cache_size with the pragma 
>statements.
>>
>>You cannot change the page size of a database after it is 
>created(*).  
>>When you  call sqlite3_open and the file doesn't exist then a zero 
>>length file is created (to verify you can).
>>SQLite doesn't write anything to the file until you create 
>some data.  
>>So the steps are really simple:
>>
>> sqlite3_open("filename")        -- creates zero length file
>> exec("pragma page_size=xxx")    -- sets page size to user
>> exec("create table foo(a,b,c)") -- actually writes something to file
>>
>>(*) You can however back it up to a database with a different 
>page size 
>>and I believe you can do something with vacuum too.
>>
>>Roger
>>-----BEGIN PGP SIGNATURE-----
>>Version: GnuPG v1.4.9 (GNU/Linux)
>>Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>>iEYEARECAAYFAkrMTwkACgkQmOOfHg372QRWGQCfV8+VrloH3vSyDZ046Io01yjY
>>RRgAoK/SrLoNFRIAxUQzrbSVQy5mW6Ge
>>=awOq
>>-----END PGP SIGNATURE-----
>>_______________________________________________
>>sqlite-users mailing list
>>sqlite-users@sqlite.org
>>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
>_______________________________________________
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to