'System.Data.SQLite.SQLiteException : SQL Logic Error
A Sqlite Database was created that consists on a persons FirstName and LastName.When the code is executed, System.Data.SQLite.SQLiteException: 'SQL logic error no such table: Person' is shown at code :
*var output = cnn.Query<ListPeopleModel>(" Select * from Person;", new DynamicParameters());
return output.ToList();*
where Person
is the name of my database and ListPeopleModel is my Model Class.
.
Solution 1:[1]
SQLite uses the name of the class you use to construct the database as the table. So just replace:
" Select * from Person;"
with:
" Select * from ListPeopleModel;"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Chris |