java - SQLiteBindORColumnindexoutofrangeexception -


i'm new in programming, issues while implemating sqlite database:

string[] spalten=new string[]{"uebung","datum","ergebnis"}; cursor cursor1=db.rawquery("select max(uebung) freunde", spalten); cursor1.movetofirst(); string r=cursor1.getstring(0); 

does know problem is? want read out content of box highest level.

you using rawquery wrong.

a list of columns returned used query method. rawquery has column list in query string itself; rawquery's second parameter used query parameters, not using, binding them fails.

just use this:

cursor = db.rawquery("select max(uebung) freunde", null); 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

c++ - End of file on pipe magic during open -