Hi All,

I was wondering if you could shed any light on the pattern you use for your
database connections.

I have a class;


public class FilterDBHelper extends SQLiteOpenHelper{...}

With a method;

public Cursor getFilterNodes(int _id) {...}

That returns a cursor.

The activity then takes care of closing the cursor but how is it that I
close the database at the appropriate time? I presume I must wait until
after the cursor has been closed to close the database.

Do you close a database after each query? Do you close the cursor inside a
method 'close()' of FilterDBHelper that also closes the cursor?

Any advice or links to source would be greatly appreciated.

Kind regards,

Gavin

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