【发布时间】:2019-01-22 19:22:30
【问题描述】:
尝试连接树莓派 3 上的 sqllite 数据库时出现错误 {SQLite.Net.SQLiteException: 无法打开数据库文件:C:\Data\Users\DefaultAccount\Documents\Storage.db (CannotOpen) ,用WIN IOT是操作系统。我正在使用 SQLite 的 SQLite.Net-PCL 版本 3.1.1 实现。
var documentsPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); var fileName2 = "Storage.db";
var path2 = Path.Combine(documentsPath, fileName2);
try
{
using (var connection = new SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), path2))
{
}
}
catch (Exception ex)
{
string m_er = ex.ToString();
}
【问题讨论】:
标签: sqlite raspberry-pi iot windows-10-iot-core