R RVP Active Member Licensed User Longtime User Apr 24, 2014 #1 I am getting this error when I try to read a record from an SQLLIte database that has a BLOB field defined I currently am forcing it to work by doing: Code: Copy Try res.Put(cur.GetColumnName(i).ToLowerCase, cur.GetString2(i)) Catch Dim byt() As Byte: byt = cur.GetBlob2(i) res.Put(cur.GetColumnName(i).ToLowerCase, BytesToString(byt,0,byt.Length,"UTF8")) End Try But I would rather make it more proactive, and only use this code if the column is actually a type of Blob Is there anyway to tell this? Cursor does not seem to have the info on column types
I am getting this error when I try to read a record from an SQLLIte database that has a BLOB field defined I currently am forcing it to work by doing: Code: Copy Try res.Put(cur.GetColumnName(i).ToLowerCase, cur.GetString2(i)) Catch Dim byt() As Byte: byt = cur.GetBlob2(i) res.Put(cur.GetColumnName(i).ToLowerCase, BytesToString(byt,0,byt.Length,"UTF8")) End Try But I would rather make it more proactive, and only use this code if the column is actually a type of Blob Is there anyway to tell this? Cursor does not seem to have the info on column types
Erel B4X founder Staff member Licensed User Longtime User Apr 24, 2014 #2 See this example: Android SQLite Viewer Upvote 0