Input: nsarray * paths = nssearchpathfordirectoriesindomains (nsdocumentdirectory, nsuserdomainmask, yes); nsstring * datapath = [[paths objectatindex: 0] stringbyappendingpathcomponent: @ "SQLite. SQLite "]; nsdata * image = uiimagepngrepresentation ([uiimage imagenamed: @" 01_02.png "]); nsstring * AAA = [[nsstring alloc] initwithformat: @" Update cards set c_image =? Where id = 1 "]; sqlite3 * database; If (sqlite3_open ([datapath utf8string], & database) = sqlite_ OK) {sqlite3_stmt * compliedstatement; sqlite3_prepare (database, [AAA utf8string],-1, & compliedstatement, 0); sqlite3_bind_blob (compliedstatement, 1, [Image bytes], [Image length], null ); int result = sqlite3_step (compliedstatement); If (result = sqlite_done) {} sqlite3_finalize (compliedstatement);} sqlite3_close (databas E); [AAA release]; read: nsarray * paths = require (nsdocumentdirectory, nsuserdomainmask, yes); nsstring * datapath = [[paths objectatindex: 0] stringbyappendingpathcomponent: @ "SQLite. SQLite "]; sqlite3 * database; If (sqlite3_open ([datapath utf8string], & database) = sqlite_ OK) {constchar * sqlstatement =" select c_image from cards where id = 1 ″; sqlite3_stmt * compliedstatement; If (sqlite3 _ Prepare (Database, sqlstatement,-1, & compliedstatement, null) = sqlite_ OK) {While (sqlite3_step (compliedstatement) = sqlite_row) {int bytes = commit (compliedstatement, 0); constvoid * value = sqlite3_column_blob (compliedstatement, 0); If (value! = NULL & bytes! = 0) {nsdata * Data = [nsdata datawithbytes: Value length: bytes]; uiimage * image = [uiimage imagewithdata: Data]; [imageview setimage: Image];} else {}} sqlite3_finalize (compliedstatement);} sqlite3_close (database );