コード例 #1
0
        public TableColumn(DataRow row)
        {
            TableCatalog           = row["TABLE_CATALOG"].ToString();
            TableSchema            = row["TABLE_SCHEMA"].ToString();
            TableName              = row["TABLE_NAME"].ToString();
            ColumnName             = row["COLUMN_NAME"].ToString();
            ColumnDefault          = row["COLUMN_DEFAULT"].ToString();
            IsNullable             = row["IS_NULLABLE"].ToString();
            DataType               = row["DATA_TYPE"].ToString();
            CharacterSetCatalog    = row["CHARACTER_SET_CATALOG"].ToString();
            CharacterSetSchema     = row["CHARACTER_SET_SCHEMA"].ToString();
            CharacterSetName       = row["CHARACTER_SET_NAME"].ToString();
            CollationCatalog       = row["COLLATION_CATALOG"].ToString();
            OrdinalPosition        = ConvertUtility.ToInt32Nullable(row["ORDINAL_POSITION"]);
            CharacterMaximumLength = ConvertUtility.ToInt32Nullable(row["CHARACTER_MAXIMUM_LENGTH"]);
            CharacterOctetLength   = ConvertUtility.ToInt32Nullable(row["CHARACTER_OCTET_LENGTH"]);
            NumericScale           = ConvertUtility.ToInt32Nullable(row["NUMERIC_SCALE"]);
            NumericPrecisionRadix  = ConvertUtility.ToInt16Nullable(row["NUMERIC_PRECISION_RADIX"]);
            DatetimePrecision      = ConvertUtility.ToInt16Nullable(row["DATETIME_PRECISION"]);
            NumericPrecision       = ConvertUtility.ToByteNullable(row["NUMERIC_PRECISION"]);
            IsSparse               = ConvertUtility.ToBooleanNullable(row["IS_SPARSE"]);
            IsColumnSet            = ConvertUtility.ToBooleanNullable(row["IS_COLUMN_SET"]);
            IsFilestream           = ConvertUtility.ToBooleanNullable(row["IS_FILESTREAM"]);

            NetTypeName = DataTypeUtils.GetNetTypeName(DataType).Name;
        }