0
我有一个简单的查询,在名为“CUSTOMER”的表中全选一个。Windows Phone的sqlite选择全部
这是我的表:
public class CUSTOMER : Extension.Shared
{
[PrimaryKey, Indexed]
public Guid ID { get; set; }
[Indexed]
public string FULL_NAME { get; set; }
public string PHONE_NO { get; set; }
//public string PIVA_CF { get; set; }
public DateTime? MODIFIED_ON { get; set; }
这是给我的问题
public List<CUSTOMER> SelectAll()
{
SQLiteConnection conn = new SQLiteConnection(DatabasePath());
return conn.Query<CUSTOMER>("SELECT * FROM CUSTOMER");
}
每次运行此操作的查询时,查询将返回SQLite.cs文件的错误:
if (r != SQLite3.Result.OK)
{
throw SQLiteException.New (r, String.Format ("Could not open database file: {0} ({1})", DatabasePath, r));
}
如果大小可以是一个有用的,这个表有近50000条记录。 我在具有100000或80000条记录的几个表中遇到同样的问题。 其他表没有问题,其他查询没有问题。
我可以说这是因为,因为我觉得被严重保存在表中,我一次又一次表安装,但我注意到,从同一个页面,我可以把这个查询没有任何问题,所有表:
public List<CUSTOMER> SelectByFilter(string Filter)
{
SQLiteConnection conn = new SQLiteConnection(DatabasePath());
return conn.Query<CUSTOMER>(string.Format("SELECT * FROM CUSTOMER WHERE FULL_NAME LIKE '{0}%'", Filter));
}
我真的不知道这个错误从哪里来。我不知道任何大小对Sqlite3的限制。任何帮助将不胜感激。
感谢您的回答,但我的问题是selectAll。我可以在没有任何问题的情况下执行select同一数据库路径中的所有其他实体,以及同一实体中其他查询的其他操作 –