Example #1
0
        /// <summary>
        /// Sets the default collation for added string columns.
        /// </summary>
        /// <param name="collation"></param>
        public void SetDefaultCollation(Collation collation)
        {
            Int32 result = API.TabTableDefinitionSetDefaultCollation(m_Handle, ConvertEnum.ToCollation(collation));

            if (result != API.TAB_RESULT_Success)
            {
                throw new TableauException(ConvertEnum.FromResult(result), API.TabGetLastErrorMessage());
            }
        }
Example #2
0
        /// <summary>
        /// Adds a column with a specific collation.
        /// </summary>
        /// <param name="name"></param>
        /// <param name="type"></param>
        /// <param name="collation"></param>
        public void AddColumnWithCollation(String name, Type type, Collation collation)
        {
            Int32 result = API.TabTableDefinitionAddColumnWithCollation(m_Handle, name, ConvertEnum.ToType(type), ConvertEnum.ToCollation(collation));

            if (result != API.TAB_RESULT_Success)
            {
                throw new TableauException(ConvertEnum.FromResult(result), API.TabGetLastErrorMessage());
            }
        }