有没有办法从代码中缩小数据库?我在我的数据库中发现一些表损坏了:如何从代码中检测到并修复它?Xamarin和SQLite:修复损坏的数据库和缩小
当我尝试使用Execute
更新特定表中的记录时,我总是收到一个Corrupt
错误。
表的定义是
[Table("tbl_Colour")]
public class Colour : BaseTableListing {
}
public class BaseTableListing : ITableEntity
{
[PrimaryKey, AutoIncrement]
[Indexed]
public int Id { get; set; } = 0;
public string CreatedBy { get; set; } = "";
public DateTime CreatedDate { get; set; } = DateTime.Now;
// more fields
// ...
}
查询是
UPDATE tbl_Colour SET IsUpdated = 0,
SynchronizeDate=CAST((((JulianDay('2017-04-04 09:22:12', 'localtime')
- 2440587.5)*86400.0) + 62135596800) * 10000000 AS BIGINT)
WHERE ID = 57;
预先感谢您。
感谢您的留言 – Enrico
我发现了另一个命令'integrity_check',但我不知道我怎样才能从调用它'CreateCommand' – Enrico