/// <summary> /// Método que cria a coluna /// </summary> /// <param name="coluna"></param> /// <returns>True - criou; False - não criou</returns> public bool CriaColuna(MDN_Campo coluna) { if (ExisteColuna(coluna.Name_Field)) { return(true); } string sentenca = "ALTER TABLE " + this.table_name + " ADD " + coluna.InsertFieldDataBase(); return(DataBase.Connection.Execute(sentenca)); }
/// <summary> /// Method that creates a temp table /// </summary> /// <param name="campos">Filed on the table</param> /// <returns>True - Table Created; False - Impossible to create the table</returns> public static DbDataReader LerTabelaTemporaria(List <string> fields) { List <MDN_Campo> campos = new List <MDN_Campo>(); foreach (string f in fields) { MDN_Campo campo = new MDN_Campo(f, false, Util.Enumerator.DataType.STRING, "", false, false, 3000, 0); campos.Add(campo); } return(LerTabelaTemporaria(campos)); }
/// <summary> /// Method that creates a temp table /// </summary> /// <param name="campos">Filed on the table</param> /// <returns>True - Table Created; False - Impossible to create the table</returns> public static bool CreateTempTable(List <string> fields) { List <MDN_Campo> campos = new List <MDN_Campo>(); foreach (string f in fields) { MDN_Campo campo = new MDN_Campo(f, false, Util.Enumerator.DataType.STRING, "", false, false, 3000, 0); campos.Add(campo); } return(CreateTempTable(campos)); }