【发布时间】:2014-02-06 12:39:41
【问题描述】:
我有这段代码
premios pre = new premios() { name = "premio1", link = "http://www.host.com/image.png" };
if (DB.CheckPremios(pre))
{//does stuff
}
CheckPremios 功能就是这个:
public bool CheckPremios(premios pre)
{
using (var db = new SQLiteConnection(dbPath))
{
var existing = db.Query<premios>("select * from premios where name =" + pre.name);
if (existing != null)
{
return true;
}
}
return false;
}
附加信息:没有这样的列:premio1
它抱怨“Premio1”列不存在,尽管“Premio1”不是列名...
我的查询错了吗?
【问题讨论】:
标签: c# xaml windows-phone-8 sqlite