/*        public bool AddIcon(string url, Image image)
 *      {
 *          if (string.IsNullOrWhiteSpace(url))
 *          {
 *              return false;
 *          }
 *
 *          if (image == null)
 *          {
 *              return false;
 *          }
 *
 *          if (this.HasIcon(url))
 *          {
 *              return this.DoNonQuery("UPDATE bzt_app_bomg_icons SET='" + imageToSQLString(image) + "' WHERE ico_key='" + SQLiteDatabase2.escapeValue(url) + "';") >= 0;
 *          }
 *          else
 *          {
 *              return this.DoNonQuery("INSERT INTO bzt_app_bomg_icons (ico_key, ico_content) VALUES ('" + SQLiteDatabase2.escapeValue(url) + "', '" + imageToSQLString(image) + "');") >= 0;
 *          }
 *      }*/

        public bool AddIcon(string url, byte[] image)
        {
            if (string.IsNullOrWhiteSpace(url))
            {
                return(false);
            }

            if (image == null)
            {
                return(false);
            }

            if (this.HasIcon(url))
            {
                return(this.DoNonQuery("UPDATE bzt_app_bomg_icons SET='" + bytesToSQLString(image) + "' WHERE ico_key='" + SQLiteDatabase2.EscapeValue(url) + "';") >= 0);
            }
            else
            {
                return(this.DoNonQuery("INSERT INTO bzt_app_bomg_icons (ico_key, ico_content) VALUES ('" + SQLiteDatabase2.EscapeValue(url) + "', '" + bytesToSQLString(image) + "');") >= 0);
            }
        }
 public bool HasIcon(string url)
 {
     return(this.DoQueryExist("SELECT 1 FROM bzt_app_bomg_icons WHERE ico_key='" + SQLiteDatabase2.EscapeValue(url) + "'"));
 }