I have a table name, inside a database, called (ie) : ARI5-v006
The minus sign appears to be a problem.
Here's the query code:
String table_name="ARI5-v006";
Cursor dataCount = bdd.rawQuery("select * from " + table_name, null);
It causes an error.
Here's the logcat:
Caused by: android.database.sqlite.SQLiteException: near "-": syntax error (code 1): , while compiling: select * from ARI5-v006
I've tried add quote to the table_name.... but not working.
Any idea?
You can:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.