public void Close()
{
lock (this) {
if (handle == IntPtr.Zero)
return;
foreach (Cursor c in cursors)
c.Close();
cursors.Clear();
int st = NativeMethods.Close(handle, 0);
if (st != 0)
throw new DatabaseException(st);
handle = IntPtr.Zero;
}
}
private void Recovery() { Upscaledb.Environment env = new Upscaledb.Environment(); Database db = new Database(); env.Create("ntest.db", UpsConst.UPS_ENABLE_RECOVERY); db = env.CreateDatabase(1); byte[] k = new byte[5]; byte[] r = new byte[5]; db.Insert(k, r); db.Close(); env.Close(); }