Hello All,
I have a problem that have no idea how to solve, for now.
I have a APP the reads some images from a SQLite database in B64 strings.
Some devices read and decode the image with no problems whatsoever, but others crash the App with a SQLITE error 'cursor to big to fit in row'.
Even with a Try..Catch doesn't "catch" the error. If i place a lenght condition in the query, it works, but I only want to do that if the device hasn't enough memory., and to set a boolean (LowMemoryDevice ) var to control this.
How can I solve this problem ? Any ideas ?
Below the query. imageb64 is the image coded in a B64 string.
I have a problem that have no idea how to solve, for now.
I have a APP the reads some images from a SQLite database in B64 strings.
Some devices read and decode the image with no problems whatsoever, but others crash the App with a SQLITE error 'cursor to big to fit in row'.
Even with a Try..Catch doesn't "catch" the error. If i place a lenght condition in the query, it works, but I only want to do that if the device hasn't enough memory., and to set a boolean (LowMemoryDevice ) var to control this.
How can I solve this problem ? Any ideas ?
Below the query. imageb64 is the image coded in a B64 string.
B4X:
If ShareCode.LowMemoryDevice Then
ImageLimit = $"and length(imageb64) < 170000"$
End If
Dim sSQL As String = $"select distinct a.id, ifnull(a.image,'') as imageb64, ifnull(a.filename,'') as imagename, 0 as base_image, 0 as on_report
from dta_tasks_items as a
inner join dta_requests_values as b on (b.task_tagcode=b.task_tagcode
and b.item_tagcode=a.item_tagcode and b.unique_key=a.unique_key)
where b.request_tagcode='${this.Request.Trim}'
and b.inner_request_tagcode='${this.Action.Trim}'
and b.task_tagcode='${this.Task.Trim}'
and b.item_tagcode='${this.Item.Trim}'
and b.unique_key='${this.UniqueKey.Trim}'
and b.repeatcounter=${this.RepeatCounter}
and b.repeatitemcounter=${this.RepeatItemCounter}
and b.repeatfieldcounter=${this.repeatfieldcounter}
${ImageLimit}"$