RuntimeError while retriving data from sqlite database in android

前端 未结 4 1691
情深已故
情深已故 2021-01-27 01:31

I\'m trying to insert and retrieve data from database in eclipse using sqlite, but it shows a RuntimeError. I create a layout with three edit texts and one button t

4条回答
  •  花落未央
    2021-01-27 01:49

    In your activity initialize the ctxx in onCreate:

    ctxx=this;

    or

    DBHelper DB=new DBHelper(MainActivity.this);

    whenever you will initialize database object will null you will get sqlite locked exception.

提交回复
热议问题