Beispiel #1
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();
            }
        }
Beispiel #2
0
        public SQLiteCode Open(string filename)
        {
            SQLiteString nativeStr = new SQLiteString(this, _Encoding, filename);

            try
            {
                return(open(nativeStr.ToSQLite(), out _Handle));
            }
            finally
            {
                nativeStr.Dispose();
            }
        }
Beispiel #3
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();
            }
        }
Beispiel #4
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();
     }
 }
Beispiel #5
0
 public SQLiteCode Open(string filename)
 {
     SQLiteString nativeStr = new SQLiteString(this, _Encoding, filename);
     try
     {
         return open(nativeStr.ToSQLite(), out _Handle);
     }
     finally
     {
         nativeStr.Dispose();
     }
 }
Beispiel #6
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();
            }
        }