F fatman Active Member Licensed User Longtime User Mar 29, 2012 #1 Hi Erel, in this old thread (http://www.b4x.com/forum/basic4android-updates-questions/13681-sqlite-wal-shm.html#post90354) you stated this code sql.ExecNonQuery("PRAGMA journal_mode=DELETE") My code is like that and returns an error at runtime: SQL1.Initialize(mydir, Myfile, False) ' SQL1.ExecNonQuery("PRAGMA journal_mode=DELETE") If I delete the line with the pragma-statement my app is running fine... What is wrong with the pragma-statement? Thanx in advance Fatman
Hi Erel, in this old thread (http://www.b4x.com/forum/basic4android-updates-questions/13681-sqlite-wal-shm.html#post90354) you stated this code sql.ExecNonQuery("PRAGMA journal_mode=DELETE") My code is like that and returns an error at runtime: SQL1.Initialize(mydir, Myfile, False) ' SQL1.ExecNonQuery("PRAGMA journal_mode=DELETE") If I delete the line with the pragma-statement my app is running fine... What is wrong with the pragma-statement? Thanx in advance Fatman
Erel B4X founder Staff member Licensed User Longtime User Mar 29, 2012 #2 Which Android version are you using? What is the error message? Upvote 0
F fatman Active Member Licensed User Longtime User Mar 29, 2012 #3 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 Upvote 0
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
Erel B4X founder Staff member Licensed User Longtime User Mar 29, 2012 #4 This command returns a value, so you should use: B4X: Dim c As Cursor c = sql.ExecQuery("PRAGMA journal_mode=DELETE") c.Close Upvote 0
This command returns a value, so you should use: B4X: Dim c As Cursor c = sql.ExecQuery("PRAGMA journal_mode=DELETE") c.Close
F fatman Active Member Licensed User Longtime User Mar 30, 2012 #5 Thank you very much Erel! This helped me to increase the speed of my sqlite databases. Fatman Upvote 0
luciano deri Active Member Licensed User Longtime User Oct 15, 2014 #6 Hi. How can read che pragma user_versione ? Thank you very much. Upvote 0
M Mahares Expert Licensed User Longtime User Oct 15, 2014 #7 You can do this: B4X: Dim MyJournal As String MyJournal=SQL1.ExecQuerySingleResult("PRAGMA Journal_mode") Log("Myjournal: " & MyJournal) 'displays the mode type of your database Upvote 0
You can do this: B4X: Dim MyJournal As String MyJournal=SQL1.ExecQuerySingleResult("PRAGMA Journal_mode") Log("Myjournal: " & MyJournal) 'displays the mode type of your database