[英]Simple Query using Slite.net-PCL for Xamarin Forms
I am trying to retrieve the database value using simple query and I am unable to do that. 我正在尝试使用简单查询来检索数据库值,但我无法做到这一点。 Below is my code. 下面是我的代码。
try
{
_connection = DependencyService.Get().GetConnection();
var tt = _connection.Query<string>("select * from PRODUCT;");
}
catch(Exception ex) { }
I am getting an Exception of "Row" . 我收到“ Row”的异常。 I am using SQLite.net-PCL library , I have the data in the database. 我正在使用SQLite.net-PCL库,数据库中有数据。 Please help me on how can I retrieve the data from the Database using the simple query. 请帮助我如何使用简单查询从数据库中检索数据。 I don't want to create a class for the table type. 我不想为表类型创建一个类。 Any suggestions will be truly appreciated.! 任何建议将不胜感激。
确保数据库的唯一列为VARCHAR类型,以匹配查询的字符串列表返回类型。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.