Convert a image to base64 and then trying to save in database

116 views
Skip to first unread message

csplrj

unread,
Feb 16, 2011, 10:53:33 AM2/16/11
to Gears Users
Convert a image to base64 and then trying to save in database but it
throws exception saying that "SQL statement is too long." Is there any
way out for this

Thanks in advance

CSJakharia

Kevin Layman

unread,
Feb 17, 2011, 8:17:44 AM2/17/11
to gears...@googlegroups.com
Is there some reason you can't just store it as a blob?

csplrj

unread,
Feb 18, 2011, 4:37:13 AM2/18/11
to Gears Users
How to use store image as a blob?
I mean I used filereader and it gives base64. How can I get blob
object?

Thanks in advance

CSJakharia

Kevin Layman

unread,
Feb 18, 2011, 7:50:03 AM2/18/11
to gears...@googlegroups.com
Try writing that to a column of type blob and see if that will work. If it doesn't I think I read that Gears already chunks text data that exceeds the length limit that can be handled by sqlite so I don't think chunking it will help but it might be worth a try anyway. Experiment a little with difference sized pics and see if its size-related or something else.
Reply all
Reply to author
Forward
0 new messages