How to insert $ symbol in the sql database in android?
When i’m trying to insert the $ and ‘ symbols.
it gives the errors as follows,
02-18 00:39:39.821: E/AndroidRuntime(946): android.database.sqlite.SQLiteException: unrecognized token: "$": INSERT INTO NoteLists (time, data, color) VALUES ('12:39:39 AM Feb 18, 2012', '&/:;()!@".,?'$<>','#D2FF00');
please help me.
Try to escape them.
\$and''.Otherwise put those signs into a string and use parameter binding which is recommended for security reasons anyways.