예제 #1
0
    /// <summary>
    /// Creates new instance of SQLiteVdbe class by compiling a statement
    /// </summary>
    /// <param name="query"></param>
    /// <returns>Vdbe</returns>
    public SQLiteVdbe( SQLiteDatabase db, String query )
    {
      vm = null;

      // prepare and compile 
#if NET_35
      Sqlite3.PrepareV2NoTail
#else
Sqlite3.sqlite3_prepare_v2
#endif
( db.Connection(), query, query.Length, ref vm, 0 );
    }
        /// <summary>
        /// Creates new instance of SQLiteVdbe class by compiling a statement
        /// </summary>
        /// <param name="query"></param>
        /// <returns>Vdbe</returns>
        public SQLiteVdbe(SQLiteDatabase db, String query)
        {
            vm = null;

            // prepare and compile
#if NET_35
            Sqlite3.PrepareV2NoTail
#else
            Sqlite3.sqlite3_prepare_v2
#endif
                (db.Connection(), query, query.Length, ref vm, 0);
        }
예제 #3
0
        /// <summary>
        /// Creates new instance of SQLiteVdbe class by compiling a statement
        /// </summary>
        public SQLiteVdbe(SQLiteDatabase db, string query)
        {
            vm        = null;
            LastError = string.Empty;

            // prepare and compile
            LastResult = Sqlite3.sqlite3_prepare_v2(db.Connection(), query, query.Length, ref vm, 0);

            if (LastResult != Sqlite3.SQLITE_OK)
            {
                throw new SQliteException("Could not execute query: " + query, LastResult);
            }
        }