Having this line
Cursor c = db.rawQuery("PRAGMA table_info(?)", new开发者_C百科 String[] {tableName});
and getting this:
android.database.sqlite.SQLiteException: near "?": syntax error: , while compiling: PRAGMA table_info(?)
Do you know why?
Try temporarily hard-wiring in a table name. If that works, then you cannot use positional parameters for pragma parameters -- you'd just need to do some string concatenation yourself.
精彩评论