I have a small iphone application that syncs with a server in this application i use sqlite3 to save the data, one of the tables has one field that's a blob (fieldName foto). To sync i need to send the data in a text file over the network, so i need to convert the blob to text.
The problem it's that i can't convert/cast the blob to text.
In the sqlite manual (http://www.sqlite.org/lang_expr.html), it says that it can be done: "To cast a BLOB value to TEXT, the sequence of bytes that make up the BLOB is interpreted as text encoded using the database encoding."
But i can't get this to work.
Query: SELECT CAST(Foto AS TEXT) FROM myTable;
Result: ????
What I'm missing?