Example #1
0
 public static bool Add(string table, Ngram ngram)
 {
     MysqlHelper.Open();
     MysqlHelper.cmd.Parameters.Clear();
     MysqlHelper.cmd.Connection  = MysqlHelper.conn;
     MysqlHelper.cmd.CommandText = "INSERT INRO " + table + " VALUES ({},{},{})";
     return(false);
 }
Example #2
0
        public static bool Add(Slang slang)
        {
            if (!slang.IsNull())
            {
                string CommandText = "INSERT INTO `" + Data_Server.Table_Slang + "` (word ,explanation ,synonyms ,lang )VALUES (@WORD,@EXPLANATION,@SYNONYMS,@LANG);";

                MysqlHelper.Open();
                MysqlHelper.cmd = new MySqlCommand(CommandText, MysqlHelper.conn);
                //MysqlHelper.cmd.CommandType = CommandType.StoredProcedure;
                MysqlHelper.cmd.Parameters.Add("@WORD", MySqlDbType.Char, 255, "word").Value = "slang.word";
                MysqlHelper.cmd.Parameters.Add("@EXPLANATION", MySqlDbType.Text).Value       = "slang.explanation";
                MysqlHelper.cmd.Parameters.Add("@SYNONYMS", MySqlDbType.Char).Value          = "slang.synonyms";
                MysqlHelper.cmd.Parameters.Add("@LANG", MySqlDbType.Char).Value = "slang.lang";
                foreach (MySqlParameter p in MysqlHelper.cmd.Parameters)
                {
                    System.Windows.Forms.MessageBox.Show(p.Value.ToString() + p.ParameterName);
                }
                MysqlHelper.cmd.ExecuteNonQuery();
            }
            return(false);
        }
Example #3
0
 public static Ngram[] select(string table, Ngram ngram)
 {
     MysqlHelper.Open();
     return(null);
 }
Example #4
0
 public static bool update(string table, Ngram ngram)
 {
     MysqlHelper.Open();
     return(false);
 }
Example #5
0
 public static Slang[] select(Slang slang)
 {
     MysqlHelper.Open();
     return(null);
 }
Example #6
0
 public static bool update(Slang slang)
 {
     MysqlHelper.Open();
     return(false);
 }