NSImage to blob and blob to NSImage (SQLite, NSData)
The <
and >
around your actual data come from NSData. By using %@
in your format string and providing data
, NSString
sends description
to data
. [NSData description]
wraps the content between <
and >
.
Another issue with your code is, that you seem to mix parameter-less & parameter prepared statements:
- Either use
stringWithFormat:
to create a complete query statement - or use a query like
INSERT INTO Bookmarks (title ...) VALUES (? ...)
combined withsqlite3_bind_blob
The parameter syntax SQLite supports can be found here:http://www.sqlite.org/c3ref/bind_blob.html