SQLite exception: "no such function: BigCount" when using "count" calling OData service with EntityFramework provider SQLite exception: "no such function: BigCount" when using "count" calling OData service with EntityFramework provider sqlite sqlite

SQLite exception: "no such function: BigCount" when using "count" calling OData service with EntityFramework provider


I also encountered the error SQL logic error or missing database\r\nno such function: BigCount and here are the detailed step-by-step instructions I used to update the code to resolve the issue on a Windows operating system:

  1. Download fossil and extract fossil.exe to your <working> directory

  2. Open a normal command prompt

  3. Run cd <working>

  4. Run fossil clone https://system.data.sqlite.org/ sds.fossil

  5. Run fossil open sds.fossil

  6. Run fossil update <release-tag>

    For example, fossil update release-1.0.105.2

  7. Update .\System.Data.SQLite.Linq\SQL Generation\SqlGenerator.cs:
    a. un-comment lines 1978 - 1983
    b. replace line 1982 with the following line:

    aggregateResult.Append("COUNT");

  8. Run cd Setup

  9. Run set_YYYY.bat

    For example, to build the net451 binaries, run set_2013.bat

  10. Run build.bat ReleaseManagedOnly

  11. Remove the references to System.Data.SQLite.Linq and System.Data.SQLite.EF6 from the ASP.NET Web project

  12. Add references to the new System.Data.SQLite.Linq.dll and System.Data.SQLite.EF6.dll from <working>\bin\2013\Release\bin in the ASP.NET Web project

Sources:

System.Data.SQLite Source Code
System.Data.SQLite Build Procedures
System.Data.SQLite Ticket UUID 76c2eaadc0297696b2c5fb10d41a22325f56f9b9