Thanks for spotting the comma. I've removed it but it still cites this query as an error. In fact, no matter what I try to do the same error is displayed. Even if I change the intent pointing to this class, to completely different non database related class I still get this error and it crashes. How is this possible?
On Sep 3, 8:56 am, Kostya Vasilyev <kmans...@gmail.com> wrote: > You have an error in the SQL for creating the table: > > 03.09.2010 5:54, kingh32 пишет: > > > + "shotsPerRound, INTEGER" > > The comma should be at the end "shotsPerRound INTEGER,". This misplaced > comma causes the "shooter" column to not be created. > > Also, you really want to use parametrized queries for inserting bulk > data, so instead of: > > db.execSQL("INSERT INTO tablename VALUES('a', 'b', 'c')"); > > you want to be doing: > > db.execSQL("INSERT INTO tablename VALUES(?, ?, ?)", new String[]{ valA, valB, > valC}); > > -- Kostya > > -- > 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en