I cant get adb uninstall to work
I'm doing this

adb uninstall <package>
I've also tried

adb uninstall [-k]<package> and adb uninstall []<package>

In the mean time I've created another database and tried to populate
it with the new queries but it still tells me that I'm trying to
populate an 8 column table with 9 columns.

final String CREATE_TABLE_EVENT = "CREATE TABLE IF NOT EXISTS
tbl_events("
                                + "entryID INTEGER PRIMARY KEY , "
                        + "eventName TEXT,"
                        + "date TEXT,"
                        + "eventType TEXT,"
                        + "numRounds INTEGER,"
                        + "shotsPerRound INTEGER"
                        + "shooter TEXT,"
                        + "distance TEXT,"
                        + "totalScore INTEGER);";


String INSERT_INTO_EVENT = "INSERT INTO tbl_events VALUES"
                                 +"(1,'"
                                 + eventName
                                 +"','"
                                 + date
                                 +"','"
                                 + eventType
                                 +"','"
                                 + numRounds
                                 +"','"
                                 + shotsPerRound
                                 +"','"
                                 + shooter
                                 +"','"
                                 + distance
                                 +"','"
                                 + totalScore +"');";

I've looked at these over and over and there are definitely 9 fields
in each.

I would like to change them to look like your example above but I dont
really understand this construct...

db.execSQL("INSERT INTO tablename VALUES(?, ?, ?)", new String[]
{ valA, valB, valC});

What would I replace the question marks with - sorry if thats a really
silly question!
On Sep 3, 1:35 pm, Kostya Vasilyev <[email protected]> wrote:
>   I believe that one of the columns is still missing, so you get this
> error at one of these lines:
>
> cursor.getString(cursor.getColumnIndex("blah"))
>
> Where getColumnIndex() returns -1, because the column is not in the
> query results, and getString() is being asked to get the data for column
> -1, which is invalid.
>
> - Change your getColumnIndex to getColumnIndexOrThrow, this will let you
> see which column is missing in the query
>
> - Cache column indices outisde the loop
>
> - Before running again, uninstall the application with "adb uninstall"
> to force the database to be recreated
>
> -- Kostya
>
> 03.09.2010 15:24, kingh32 пишет:
>
> > E/CursorWindow( 1354): Bad request for field slot 0,-1. numRows = 1,
> > numColumns
> > = 2
>
> --
> Kostya Vasilyev -- WiFi Manager + pretty widget 
> --http://kmansoft.wordpress.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to