What this means, "**SQLite.SQLiteException:** 'no more rows available'"?

Shantimohan Elchuri 721 Reputation points

The database version in my app has changed. So I was trying to migrate old data to new database. My methods work fine on Android emulator and iOS simulator & device. But on Android device (Samsung A01 running Android 10) I am getting the above mentioned error. This is what I am doing:

  1. I read the data from old version database
  2. Convert the data to new version by adding default values to the new columns. I'm not yet writing this new data to new database.
  3. Now I recreate the database with new schema. This creates some new tables also.
  4. Then I add some default data rows to the new tables.
  5. Then I refresh in memory VMs that hold these data.
  6. Then modify the default values added to the new columns to one of the data added in step 4 above.
  7. Then write the new updated data to the new database tables.

This error is occurring in step 4. It is not inserting the default data rows to the new tables. I don't understand the meaning of 'no more rows available' in this context. I just read all data in a table by using the following code in DBOps class:

public async Task<List<GroupName>> GetAllGroupsAsync()
    return await dbConn.Table<GroupName>().ToListAsync();
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,206 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
11,592 questions
{count} votes