Code example for SQLiteStatement

Methods: close, simpleQueryForString

0
	{ 
		ensureOpened(); 
		SQLiteStatement stmt = null;
		try { 
			stmt = mDB.compileStatement(sql);
			return stmt.simpleQueryForString();
		} catch ( Exception e ) {
			// not found or error 
			return null; 
		} finally { 
			if (stmt != null)
				stmt.close();
		} 
	} 
	 
	public static String quoteSqlString(String src) {
		if (src==null)
			return "null"; 
		String s = src.replaceAll("\\'", "\\\\'");
		return "'" + s + "'";
	}