2 of 2
replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
If you're using one instance of SQLiteOpenHelper
across your application (which you should be doing), you should never need to call close
on it or the SQLiteDatabase
object.
Why do you need the DBConnect
class? See this answer for another question for a proper thread-safe SQLiteOpenHelper
subclass. If you follow that example, this would be its usage:
DatabaseHelper dbHelper = DatabaseHelper.getInstance(getActivity());
dbHelper.insertIPAddress(ipAddr);
seand
- 2.5k
- 1
- 20
- 29
default