Exemple #1
0
        public void Open()
        {
            ParseConnectionString();
            byte[] filename = NativeUtils.MakeUTF8(path);
            int    code     = sqlite3_open_v2(filename, out DB, 0x2, IntPtr.Zero);

            if (code > 0)
            {
                throw new NativeException(code);
            }
        }
Exemple #2
0
        public void Prepare()
        {
            byte[] sql = NativeUtils.MakeUTF8(CommandText);
            IntPtr db  = ((NativeConnection)Connection).DB;
            IntPtr tail;
            int    code = sqlite3_prepare_v2(db, sql, sql.Length, out Statement, out tail);

            if (code > 0)
            {
                throw new NativeException(code);
            }
        }
Exemple #3
0
 void BindIndex(NativeParameter nParam)
 {
     byte[] name = NativeUtils.MakeUTF8(nParam.ParameterName);
     nParam.Index = sqlite3_bind_parameter_index(Statement, name);
 }