Android - Can SQLite Cursor's be used after closing the database?

前端 未结 3 1807
广开言路
广开言路 2021-02-07 10:11

First of all, correct me if I\'m wrong, but if you close a database connection, you can\'t use the Cursor you got from it, correct?

db.open();
Cursor c = db.quer         


        
3条回答
  •  太阳男子
    2021-02-07 10:50

    No, As it says in the link below, if you close the database, the cursor becomes invalid.

    Will cursor be still alive after database is closed?

提交回复
热议问题