SQLITE and PRAGMA

Discussion in 'Questions' started by fatman, Mar 29, 2012.

  1. fatman

    fatman Member Licensed User

  2. Erel

    Erel Administrator Staff Member Licensed User

    Which Android version are you using? What is the error message?
     
  3. fatman

    fatman Member Licensed User

    Hi Erel,

    I´m using Andoid 3.1 and the error message is:

    android.database.sqlite.SQLiteException: unknown error: Queries can be performed using SQLiteDatabase query or rawQuery methods only.

    The logs shows more or less the same.

    Fatman
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    This command returns a value, so you should use:
    Code:
    Dim c As Cursor
       c = 
    sql.ExecQuery("PRAGMA journal_mode=DELETE")
       c.Close
     
  5. fatman

    fatman Member Licensed User

    Thank you very much Erel!
    This helped me to increase the speed of my sqlite databases.

    Fatman
     
  6. luciano deri

    luciano deri Member Licensed User

    Hi. How can read che pragma user_versione ? Thank you very much.
     
  7. Mahares

    Mahares Well-Known Member Licensed User

    You can do this:
    Code:
    Dim MyJournal As String
    MyJournal=SQL1.ExecQuerySingleResult(
    "PRAGMA Journal_mode"
    Log("Myjournal: " & MyJournal)  'displays the mode type of your database
     
    luciano deri likes this.

Share This Page

Loading...