Beispiel #1
0
        /// <summary>
        ///     Creates a new data field in the Mdb table.
        ///     Any pending changes to the collection will be lost.
        /// </summary>
        /// <param name="fieldName">The string name of the field to be added.  Spaces in the field name are replaced.</param>
        /// <param name="typeName">The data type of the field to be added.  Default is TEXT(255).</param>
        public virtual void AddDataField(string fieldName, string typeName = "TEXT(255)")
        {
            if (Table.Columns.Contains(fieldName))
            {
                return;
            }

            DbMethods.AddDbField(Application.MdbPath, Table.TableName, fieldName, typeName);

            Application.MdbDatabase = null;
            Refresh();
        }