Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/335.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在windows mobile 6.5中打开SQLite数据库文件时出现问题_C#_Windows Mobile 6.5 - Fatal编程技术网

C# 在windows mobile 6.5中打开SQLite数据库文件时出现问题

C# 在windows mobile 6.5中打开SQLite数据库文件时出现问题,c#,windows-mobile-6.5,C#,Windows Mobile 6.5,有人知道如何在WindowsMobile6.5(emulator)中打开sqlite数据库吗?我尝试使用以下代码打开它,但没有成功。上面写着“无法打开数据库” 我曾经使用数据库文件的完整路径。有人知道为什么会这样吗?还有其他建议吗 问候, SW Lau难怪此代码不起作用 路径无效。windows mobile中没有C:\这样的驱动器 位置(“C:\Documents and Settings…………\Data\iPhysMobile”)由您的计算机和windows mobile共享是从计算机的角

有人知道如何在WindowsMobile6.5(emulator)中打开sqlite数据库吗?我尝试使用以下代码打开它,但没有成功。上面写着“无法打开数据库”

我曾经使用数据库文件的完整路径。有人知道为什么会这样吗?还有其他建议吗

问候,


SW Lau

难怪此代码不起作用

路径无效。windows mobile中没有C:\这样的驱动器

位置
(“C:\Documents and Settings…………\Data\iPhysMobile”)
由您的计算机和windows mobile共享是从计算机的角度而不是从windows mobile的角度

若要了解windows mobile中运行应用程序的文件夹,请使用
Directory.GetCurrentDirectory
。然后从该位置打开.db文件

private SQLiteConnection con;

public void OpenDB(){

con = new SQLiteConnection(@"Data Source=C:\Documents and Settings................\Data\iPhysioMobile");

con.open();

}