pesquera Active Member Licensed User Longtime User Apr 27, 2016 #1 Hi, this post is related to this one: https://www.b4x.com/android/forum/t...ized-key-value-store.63536/page-3#post-419416 That code does work exellent But.. I have some issue with just one data file (SQLite db), that can not figure it out Here is my code: Code: Copy File.Copy(File.DirInternal,"MyDb.db",File.DirDefaultExternal,"MyDb.db") Dim db() As Byte=Bit.InputStreamToBytes(File.OpenInput(File.DirDefaultExternal,"MyDb.db")) Starter.ckvs.Put(Starter.ckvsUser,"MyParam",db) If I try with another db file, instead of this db file, all is Ok But.. with this db file I have an error on the Sub HandleQueue into the ClientKVS Class The error is this: java.lang.IllegalStateException: Couldn't read row 0, col 0 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it. Click to expand... Debugging into Sub HandleQueue, I can see that the line with the issue is this: Code: Copy Dim queue_id As Long = rs.GetLong("qid") Could it be because the size of the db file? db.Length=360448 on the db file that does work ok db.Length=2636800 on the db file that has the issue Thanks for any help
Hi, this post is related to this one: https://www.b4x.com/android/forum/t...ized-key-value-store.63536/page-3#post-419416 That code does work exellent But.. I have some issue with just one data file (SQLite db), that can not figure it out Here is my code: Code: Copy File.Copy(File.DirInternal,"MyDb.db",File.DirDefaultExternal,"MyDb.db") Dim db() As Byte=Bit.InputStreamToBytes(File.OpenInput(File.DirDefaultExternal,"MyDb.db")) Starter.ckvs.Put(Starter.ckvsUser,"MyParam",db) If I try with another db file, instead of this db file, all is Ok But.. with this db file I have an error on the Sub HandleQueue into the ClientKVS Class The error is this: java.lang.IllegalStateException: Couldn't read row 0, col 0 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it. Click to expand... Debugging into Sub HandleQueue, I can see that the line with the issue is this: Code: Copy Dim queue_id As Long = rs.GetLong("qid") Could it be because the size of the db file? db.Length=360448 on the db file that does work ok db.Length=2636800 on the db file that has the issue Thanks for any help
DonManfred Expert Licensed User Longtime User Apr 27, 2016 #2 Are you using your own CloudKVS server or are you using the b4a CloudKVS-Server for development? Upvote 0
pesquera Active Member Licensed User Longtime User Apr 27, 2016 #3 I'm using my own server tested the same code with a couple of another files, does work fine (db and txt files) trying to see if the size of the db.. I'm using the VACUUM SQLite command without luck (never used it before, guessing from the web) not sure if the size could be a problem (it has 2.5 Mb) thanks Upvote 0
I'm using my own server tested the same code with a couple of another files, does work fine (db and txt files) trying to see if the size of the db.. I'm using the VACUUM SQLite command without luck (never used it before, guessing from the web) not sure if the size could be a problem (it has 2.5 Mb) thanks
pesquera Active Member Licensed User Longtime User Apr 27, 2016 #4 Yes, It was the size.. I've finally compacted it with VACUUM, and now is working Ok (it has 1.1 Mb now) thanks! Upvote 0
Yes, It was the size.. I've finally compacted it with VACUUM, and now is working Ok (it has 1.1 Mb now) thanks!