system.data.sqlite.sqliteException:SQL逻辑错误

发布于 2025-01-27 02:46:54 字数 292 浏览 3 评论 0原文

创建了一个由一个人组成的sqlite数据库。 没有这样的表:Person'在代码中显示:

*var output = cnn.Query<ListPeopleModel>(" Select * from Person;", new DynamicParameters());    
return output.ToList();*  

其中person是我的数据库的名称, listPeoplemodel 是我的模型类。 。

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.
.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鹿港小镇 2025-02-03 02:46:54

SQLITE使用您使用的类的名称来构建数据库作为表。因此,请替换

" Select * from Person;"

为:

" Select * from ListPeopleModel;"

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;"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文