使用此代碼:無法打開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方法。 –