public SqliteStatementPreparer(SqliteDatabaseHandle database, string commandText)
		{
			m_database = database;
			m_commandTextBytes = SQLiteConnection.ToUtf8(commandText);
			m_statements = new List<SqliteStatementHandle>();
			m_refCount = 1;
		}
		private static string GetErrorString(SQLiteErrorCode errorCode, SqliteDatabaseHandle database)
		{
#if NET45
			string errorString = SQLiteConnection.FromUtf8(NativeMethods.sqlite3_errstr(errorCode));
#else
			string errorString = errorCode.ToString();
#endif
			return database != null ? "{0}: {1}".FormatInvariant(errorString, SQLiteConnection.FromUtf8(NativeMethods.sqlite3_errmsg(database)))
				: errorString;
		}
		public static extern IntPtr sqlite3_errmsg(SqliteDatabaseHandle db);
		public static extern SQLiteErrorCode sqlite3_errcode(SqliteDatabaseHandle db);
		public static extern int sqlite3_db_readonly(SqliteDatabaseHandle db, [MarshalAs(UnmanagedType.LPStr)] string zDbName);
		public static extern SqliteBackupHandle sqlite3_backup_init(SqliteDatabaseHandle pDest, byte[] zDestName, SqliteDatabaseHandle pSource, byte[] zSourceName);
		public static extern int sqlite3_total_changes(SqliteDatabaseHandle db);
		public static extern void sqlite3_progress_handler(SqliteDatabaseHandle db, int virtualMachineInstructions, SQLiteProgressCallback callback, IntPtr userData);
		public static extern void sqlite3_profile(SqliteDatabaseHandle db, SqliteProfileCallback callback, IntPtr userData);
		public unsafe static extern SQLiteErrorCode sqlite3_prepare_v2(SqliteDatabaseHandle db, byte* pSql, int nBytes, out SqliteStatementHandle stmt, out byte* pzTail);
		public static extern SQLiteErrorCode sqlite3_open_v2(byte[] utf8Filename, out SqliteDatabaseHandle db, SQLiteOpenFlags flags, byte[] vfs);
		public static extern SQLiteErrorCode sqlite3_key(SqliteDatabaseHandle db, byte[] key, int keylen);
		internal SQLiteException(SQLiteErrorCode errorCode, SqliteDatabaseHandle database)
			: base(GetErrorString(errorCode, database), (int) errorCode)
		{
		}
		public SQLiteConnection(IntPtr db)
			: this()
		{
			m_db = new SqliteDatabaseHandle(db);
			SetState(ConnectionState.Open);
		}