使用此代码:无法打开SQLite数据库
public void InsertPlatypiRequestedRecord(string PlatypusId, string PlatypusName, DateTime invitationSentLocal)
{
var db = new SQLiteConnection(SQLitePath);
{
db.CreateTable<PlatypiRequested>();
db.RunInTransaction(() =>
{
db.Insert(new PlatypiRequested
{
PlatypusId = PlatypusId,
PlatypusName = PlatypusName,
InvitationSentLocal = invitationSentLocal
});
db.Dispose();
});
}
}
...我得到的, “SQLite.SQLiteException是由用户代码未处理 的HResult = -2146233088 消息=不能创建从未拆封数据库命令”
...但尝试添加“db.Open()”不起作用,因为显然没有这样的方法。
确定吗?本网站http://www.devart.com/dotconnect/sqlite/docs/Devart.Data.SQLite~Devart.Data.SQLite.SQLiteConnection.html不同意。 – PhoenixReborn
我没有使用dotconnect;也许他们有一个Open方法。 –