Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/316.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/7/sqlite/3.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# 如何在WindowsPhone7中使用本地数据库_C#_Sqlite_Windows Phone 7_Windows Phone 7.1 - Fatal编程技术网

C# 如何在WindowsPhone7中使用本地数据库

C# 如何在WindowsPhone7中使用本地数据库,c#,sqlite,windows-phone-7,windows-phone-7.1,C#,Sqlite,Windows Phone 7,Windows Phone 7.1,我正在开发一个应用程序,它将有一个已经存在的database.db文件。 我搜索了很多,但是所有适用于WindowsPhone7的解决方案都不能正常工作。对于如何实现现有数据库的sqlite,是否有任何正在运行的解决方案?我也尝试过WP7Sqliteclient,但也不能正常工作。谁能给我指路吗。 我已将生成属性设置为资源 Sqlite3.Vdbe Prepare() { Sqlite3.Vdbe ppStmt=new Sqlite3.Vdbe(); if (Sqlite3.sq

我正在开发一个应用程序,它将有一个已经存在的database.db文件。 我搜索了很多,但是所有适用于WindowsPhone7的解决方案都不能正常工作。对于如何实现现有数据库的sqlite,是否有任何正在运行的解决方案?我也尝试过WP7Sqliteclient,但也不能正常工作。谁能给我指路吗。 我已将生成属性设置为资源

Sqlite3.Vdbe Prepare()
{
    Sqlite3.Vdbe ppStmt=new Sqlite3.Vdbe();
    if (Sqlite3.sqlite3_prepare_v2(_db, CommandText, CommandText.Length, ref ppStmt, 0) != Sqlite3.SQLITE_OK)
        throw new SQLiteException(Sqlite3.sqlite3_errmsg(_db));
    BindAll(ppStmt);    // here is exception 
    return ppStmt;
}

您所说的
是什么意思windows phone 7的所有解决方案都不能正常工作
?哪一个?这些解决方案给您带来了什么问题?我尝试了针对windows phone的sqlite客户端,但sqliteclient.cs文件Sqlite3.Vdbe Prepare(){Sqlite3.Vdbe ppStmt=new Sqlite3.Vdbe();int n=Sqlite3.Sqlite3_Prepare_v2(_db,CommandText,CommandText.Length,ref ppStmt,0);如果(n!=Sqlite3.SQLITE_OK)抛出新的SQLiteException(n,SQLiteLastError());BindAll(ppStmt);在BindAll(ppStmt)返回ppStmt;}类似于Community.CsharpSqlite.WP.DLL中发生的“SQLiteClient.SQLiteException”类型的异常,但未在用户代码中处理那么为什么不先发布该异常?异常消息是什么?是否存在内部异常?