Exemplo n.º 1
0
    public void OpenStream(string name, Stream io)
    {
        if (db != null)
        {
            throw new Exception("Error database already open!");
        }

        stream = Sqlite3.sqlite3_stream_create(name, io);

        if (Sqlite3.sqlite3_stream_register(stream) != Sqlite3.SQLITE_OK)
        {
            throw new IOException("Error with opening database with stream " + name + "!");
        }

        if (Sqlite3.sqlite3_open_v2(name, out db, Sqlite3.SQLITE_OPEN_READWRITE, "stream") != Sqlite3.SQLITE_OK)
        {
            db = null;
            throw new IOException("Error with opening database with stream " + name + "!");
        }
    }
Exemplo n.º 2
0
 public SQLiteDB()
 {
     db     = null;
     stream = null;
 }
Exemplo n.º 3
0
 public SQLiteConnection()
 {
     db     = null;
     stream = null;
 }