Exemplo n.º 1
0
        public Statement Prepare(string query)
        {
            Open();
            IntPtr stmt = Sqlite3.Prepare(db, query);

            return(new Statement(db, stmt));
        }
Exemplo n.º 2
0
        public void CreateDb()
        {
            IntPtr stmt;
            IntPtr db = Sqlite3.Open(dbname);

            stmt = Sqlite3.Prepare(db, "create table test (id integer primary key, value string)");
            Sqlite3.Step(db, stmt);

            stmt = Sqlite3.Prepare(db, "insert into test values (1,'a'),(2,'b'),(3,'c'),(4,'d'),(5,'e'),(6,'f')");
            Sqlite3.Step(db, stmt);

            Sqlite3.Close(db);
        }