objective c - How to insert string that contains " character in sqlite ios -
I am using the following code but sqlite is giving me an error
NSArray * a = [Object with NSArray array: @ "\" "@" \\ \ "", zero]; Volume = [volume stringing implication ocurrenceoffstring: [an objectwithoutx: 0] with string: [an object atindex: 1]]; queryString = [NSString stringWithFormat: @ "Include Shopping List (Quantity) values (\"% @ \ ")", quantity]; This error returns to: - "diax1": the syntax error in the query is the original amount = 1 piece in the shopping list, medium (4-1 / 2 "diax1 / 8" thick ) Use placeholders to insert special characters in the SQLite (also see which special characters are allowed in Sqlite):
queryString = @ "shoppinglists (quantity) included in the values Do (?) "; Sqlite3_stmt * Compiled Statement; If (sqlite3_prepare_v2 (database, query string, -1, and compiled location, zero) == SQLITE_OK} {sqlite3_bind_text (compiled stability, 1, [quantity UTF8String], -1, SQLITE_TRANSIENT); // Use string values for sqlite3_bind_text For other types of values, see the SQLite document. // .... and so on. }
Comments
Post a Comment