[英]Windows 10 IoT Raspberry 3
I'm doing ac# application and i need to connect to sqlite database... 我正在做ac#应用程序,我需要连接到sqlite数据库...
I'm using SQLite.Net - PCL and i want that the database is located in application folder and when i give the path and i run the application i have in response this error: 我正在使用SQLite.Net-PCL,我希望数据库位于应用程序文件夹中,当我给出路径并运行应用程序时,我会响应此错误:
My database is this folder: 我的数据库是这个文件夹:
and i've just included that folder in the project 我刚刚将该文件夹包含在项目中
May you help me? 你能帮我吗?
I resolved! 我解决了! When raspberry Pi3 execute project create database file in its file system...
当树莓派3执行项目时,在其文件系统中创建数据库文件...
You're referencing the wrong database path. 您引用的数据库路径错误。
An alternative way is to try the following code, 另一种方法是尝试以下代码,
var path = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "db.sqlite");
var db = new SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), path);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.