android - Does deleting data from a database affect the cursor storing the data? -
I have to take some files from database A to databases
Therefore, I ask the data databases Remove the data from A to cursor, then in database A.
After that, I use the cursor to insert data rows to the database. Is there a problem in this process?
Because someone told me that the cursor can only be a reference, in fact the cursor does not store the data in the object, so if I remove the database A before inserting data in Database B, So something unusual can happen!
Is there anyone who refers to the cursor database or does it really save the data object?
Your case will not work The cursor is a reference to a part of the memory. If you delete the database then the data in this part of memory will also be removed.
You can use the cursor, but you must delete your old database only after the migration. Why do you want to delete the old database before entering results in a new database?
Comments
Post a Comment