iphone Programming Glossary: insert_statement
Inserting NSData into SQLite on the iPhone http://stackoverflow.com/questions/3319791/inserting-nsdata-into-sqlite-on-the-iphone instead of a string. Then you could use sqlite3_bind_blob to bind the blob to the prepared statement. sqlite3_stmt insert_statement char sql INSERT INTO table blobcolumn column2 column3 VALUES if sqlite3_prepare_v2 database sql 1 insert_statement NULL.. insert_statement char sql INSERT INTO table blobcolumn column2 column3 VALUES if sqlite3_prepare_v2 database sql 1 insert_statement NULL SQLITE_OK handle error sqlite3_bind_blob insert_statement 1 dataForImage bytes dataForImage length NULL But really.. column3 VALUES if sqlite3_prepare_v2 database sql 1 insert_statement NULL SQLITE_OK handle error sqlite3_bind_blob insert_statement 1 dataForImage bytes dataForImage length NULL But really it would be best for performance to store the image on disk and..
Storing and retrieving data from sqlite database http://stackoverflow.com/questions/8147519/storing-and-retrieving-data-from-sqlite-database connection DatabaseController getDBConnection const char text INSERT INTO Event Serial Name Date VALUES sqlite3_stmt insert_statement int prepare_result sqlite3_prepare_v2 connection text 1 insert_statement NULL if prepare_result SQLITE_DONE prepare_result.. Event Serial Name Date VALUES sqlite3_stmt insert_statement int prepare_result sqlite3_prepare_v2 connection text 1 insert_statement NULL if prepare_result SQLITE_DONE prepare_result SQLITE_OK Error sqlite3_close connection return sqlite3_bind_int insert_statement.. NULL if prepare_result SQLITE_DONE prepare_result SQLITE_OK Error sqlite3_close connection return sqlite3_bind_int insert_statement 1 newEvent.Serial sqlite3_bind_text insert_statement 2 newEvent.Name UTF8String 1 SQLITE_TRANSIENT sqlite3_bind_double insert_statement..
|