Been out of town or would have responded sooner. My db variable was in
fact null.
Thanks for bringing me back to reality. It is now working like a
champ.

Thanks.

On May 9, 7:51 am, Mark Murphy <mmur...@commonsware.com> wrote:
> If the NullPointerException happens directly on that line, then your
> db variable is null.
>
>
>
>
>
> On Mon, May 9, 2011 at 7:49 AM, Capt Spaghetti <gene_august...@msn.com> wrote:
> > I have been using the debugger to step through and the error is caused
> > by the line:
>
> >         db.delete("TempCourses", null, null);
>
> > The error occurs whether I check if there is data in the table or not.
> > I guess I could try and
> > drop the table everytime I want to clear it but it certainly seems I
> > should be able to delete the
> > contents.
>
> > I have also tried the following:
>
> >       String sql = String.format("DELETE FROM TempCourses WHERE _id >
> > 0 ");
> >       db.execSQL(sql);
>
> > I get the same NullPointerException error on the line:
>
> >      db.execSQL(sql);
>
> > Thanks...
>
> > On May 7, 12:09 pm, Kostya Vasilyev <kmans...@gmail.com> wrote:
> >> Assuming that com.oys.... is your application's package, you have a null
> >> pointer access somewhere.
>
> >> The exact location is just below the lines you posted. You could also
> >> use the debugger to step through, checking that variables are not null
> >> before you access them.
>
> >> -- Kostya
>
> >> 07.05.2011 19:42, Capt Spaghetti пишет:
>
> >> > 05-07 15:12:07.201: ERROR/AndroidRuntime(318):
> >> > java.lang.RuntimeException: Unable to start activity
> >> > ComponentInfo{com.oys.gfa.acecapper/
> >> > com.oys.gfa.acecapper.DownSelectCourse}:
> >> > java.lang.NullPointerException
>
> >> --
> >> Kostya Vasilyev --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
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training...At Your Office:http://commonsware.com/training- Hide 
> quoted text -
>
> - Show quoted text -

-- 
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

Reply via email to