Exemplo n.º 1
0
 public int bind_text(IntPtr stmt, int idx, string val, SQLiteDestructor destructor)
 {
     SQLiteString nativeStr = new SQLiteString(this, _Encoding, val);
     if (_Encoding == Encoding.UTF8)
     {
         return bind_text(stmt, idx, nativeStr.ToSQLite(), nativeStr.Length, destructor);
     }
     else
     {
         return bind_text16(stmt, idx, nativeStr.ToSQLite(), nativeStr.Length, destructor);
     }
 }
Exemplo n.º 2
0
        public int bind_text(IntPtr stmt, int idx, string val, SQLiteDestructor destructor)
        {
            SQLiteString nativeStr = new SQLiteString(this, _Encoding, val);

            if (_Encoding == Encoding.UTF8)
            {
                return(bind_text(stmt, idx, nativeStr.ToSQLite(), nativeStr.Length, destructor));
            }
            else
            {
                return(bind_text16(stmt, idx, nativeStr.ToSQLite(), nativeStr.Length, destructor));
            }
        }
Exemplo n.º 3
0
        public int prepare(string zSql, out IntPtr ppVm, out IntPtr pzTail)
        {
            SQLiteString nativeStr = new SQLiteString(this, _Encoding, zSql);

            try
            {
                return(prepare(_Handle, nativeStr.ToSQLite(), nativeStr.Length, out ppVm, out pzTail));
            }
            finally
            {
                nativeStr.Dispose();
            }
        }
Exemplo n.º 4
0
        public SQLiteCode Open(string filename)
        {
            SQLiteString nativeStr = new SQLiteString(this, _Encoding, filename);

            try
            {
                return(open(nativeStr.ToSQLite(), out _Handle));
            }
            finally
            {
                nativeStr.Dispose();
            }
        }
Exemplo n.º 5
0
        public int exec(string sql, IntPtr callback, IntPtr arg, out string errmsg)
        {
            SQLiteString nativeStr = new SQLiteString(this, _Encoding, sql);

            try
            {
                IntPtr errMsg = IntPtr.Zero;
                int    rval   = exec(_Handle, nativeStr.ToSQLite(), callback, arg, out errMsg);
                errmsg = SQLiteString.FromSQLite(this, errMsg, _Encoding);

                return(rval);
            }
            finally
            {
                nativeStr.Dispose();
            }
        }
Exemplo n.º 6
0
 public int prepare(string zSql, out IntPtr ppVm, out IntPtr pzTail)
 {
     SQLiteString nativeStr = new SQLiteString(this, _Encoding, zSql);
     try
     {
         return prepare(_Handle, nativeStr.ToSQLite(), nativeStr.Length, out ppVm, out pzTail);
     }
     finally
     {
         nativeStr.Dispose();
     }
 }
Exemplo n.º 7
0
 public SQLiteCode Open(string filename)
 {
     SQLiteString nativeStr = new SQLiteString(this, _Encoding, filename);
     try
     {
         return open(nativeStr.ToSQLite(), out _Handle);
     }
     finally
     {
         nativeStr.Dispose();
     }
 }
Exemplo n.º 8
0
        public int exec(string sql, IntPtr callback, IntPtr arg, out string errmsg)
        {
            SQLiteString nativeStr = new SQLiteString(this, _Encoding, sql);
            try
            {
                IntPtr errMsg = IntPtr.Zero;
                int rval = exec(_Handle, nativeStr.ToSQLite(), callback, arg, out errMsg);
                errmsg = SQLiteString.FromSQLite(this, errMsg, _Encoding);

                return rval;
            }
            finally
            {
                nativeStr.Dispose();
            }
        }