Author Topic: SQLite Pragmas  (Read 320 times)

Offline Jokaste

  • Member
  • *
  • Posts: 148
  • Never be pleased, always improve.
    • ImgTools
SQLite Pragmas
« on: October 26, 2018, 06:36:18 pm »
I try to use the SQLite pragmas but it seems nothing appends. For example the journal is created and I don't want it.
I have tried within or without a transaction, sqlite_exec does not report any error (SQLITE_OK).
I also have tried with boolean values (0|1) (TRUE|FALSE) or numbers.
I made a lot of research on the web but no infos.

Could you tell me how to use them, please ?

Code: [Select]
char      szCrack_Pragmas[]   =   "BEGIN TRANSACTION\n"
                           "PRAGMA foreign_keys = OFF;\n"
                           "PRAGMA temp_store = MEMORY;\n"
                           "PRAGMA count_changes = OFF;\n"
                           "PRAGMA encoding = \"UTF-8\";\n"
                           "PRAGMA legacy_file_format = OFF;\n"
                           "PRAGMA case_sensitive_like=1;"
                           "PRAGMA main.auto_vacuum = NONE;\n"
                           "PRAGMA main.journal_mode = OFF;\n"
                           "PRAGMA main.locking_mode = EXCLUSIVE;\n"
                           "PRAGMA main.max_page_count = 65536;\n"
                           "PRAGMA main.page_size = 16384;"
                           "PRAGMA main.secure_delete = OFF;\n"
                           "PRAGMA main.synchronous = OFF;\n"
                           "PRAGMA main.cache_size = 20000;\n"
                           "PRAGMA main.user_version = 230714;\n"
                           "END TRANSATION\n" ;