Android: Sqlite rawQuery out of range -
i trying use rawquery simplecursoradapter display listview, keeps throwing me error
04-29 13:36:36.453: error/androidruntime(29539): java.lang.runtimeexception: unable start activity componentinfo{com.quotemachine/com.quotemachine.quote}: android.database.sqlite.sqliteexception: bind or column index out of range: handle 0x2f65e0
i have table called quotes columns _id, auth_name, quote, category , query looks follows
return qmdb.rawquery("select _id _id, auth_name, quote, category quotes", new string[]{"where auth_name = 'robert anton wilson'"});
might know of suggestion fix problem?my original plan use basic query statement, there problem column _id , suggested go approach.
your using rawquery() wrong. second variable arguments, not clause. use instead:
return qmdb.rawquery("select _id _id, auth_name, quote, category quotes auth_name = ?", new string[] { "robert anton wilson" } );
Comments
Post a Comment