aspnet/Microsoft.Data.Sqlite

StackOverflowException when using reader.Read()

dehghani-mehdi opened this issue · 3 comments

Hi,

using (var conn = Connection)
{
    conn.Open();    
    var cmd = conn.CreateCommand();
    cmd.CommandText = $"SELECT * FROM Posts ORDER BY Id DESC";

    using (var reader = cmd.ExecuteReader())
    {
        while (reader.Read())
        {                
        }
    }    
}

I tired with if(reader.Read())) instead, but same result.

BTW I created sqlite database and tables using DB Browser for SQLite.

What version of Microsoft.Data.Sqlite are you using? Would it be possible to provide a copy of the Posts table? (e.g. by running sqlite3 mydatabase ".dump Posts" > Posts.sql)

@bricelam 2.0.1

CREATE TABLE "Posts" ( `Id` integer NOT NULL PRIMARY KEY AUTOINCREMENT, `CreatedDate` bigint, `Title` TEXT, `Picture` TEXT, `Slug` TEXT, `MetaTitle` TEXT, `MetaKeywords` TEXT, `MetaDescription` TEXT, `Content` TEXT )

Seems like the error was not related to Microsoft.Data.Sqlite, sorry.