On 8 Mar 2011, at 11:56am, liran ritkop wrote: > Tough, i didn't understand how does sqlite handle the size of the blob, is > it dynamically change? is it a fixed-size?
When handling the BLOB all in one go (setting its full value in one statement) the BLOB gets the size of what you put in it. Take a look at int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); on this page: http://www.sqlite.org/capi3ref.html#sqlite3_bind_blob If absolutely necessary you might want to set a long BLOB up piece by piece. In that case you would use int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); to add things to it, and SQLite is responsible for keeping track of how long it is so far. Whether you're making the BLOB yourself or retrieving a BLOB from a database you can use int sqlite3_blob_bytes(sqlite3_blob *); from this page: <http://www.sqlite.org/capi3ref.html#sqlite3_blob_bytes> to find out how long it is. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users