4 writes to DataType
System.Data.Common (4)
System\Data\DataColumn.cs (2)
248DataType = typeof(int); 1535clone.DataType = DataType;
System\Data\DataTable.cs (1)
463dc.DataType = Type.GetType(typeName, throwOnError: true);
System\Data\XMLSchema.cs (1)
283col.DataType = DataStorage.GetType(value);
79 references to DataType
System.Data.Common (77)
System\Data\Common\AdapterUtil.Common.cs (1)
314return DataMapping(SR.Format(SR.ADP_ColumnSchemaMismatch, srcColumn, srcType.Name, column.ColumnName, column.DataType.Name));
System\Data\Common\DataColumnMapping.cs (1)
104if ((null == dataType) || (dataType.IsArray == dataColumn.DataType.IsArray))
System\Data\DataColumn.cs (13)
241if (!IsAutoIncrementType(DataType)) 245throw ExceptionBuilder.AutoIncrementCannotSetIfHasData(DataType.Name); 270(_autoInc ??= ((DataType == typeof(BigInteger)) ? 604if (DataType != typeof(DateTime) && value != DataSetDateTime.UnspecifiedLocal) 681if (newDefaultValue != DBNull.Value && DataType != typeof(object)) 686newDefaultValue = SqlConvert.ChangeTypeForDefaultValue(newDefaultValue, DataType, FormatProvider); 690throw ExceptionBuilder.DefaultValueColumnDataType(ColumnName, newDefaultValue.GetType(), DataType, ex); 928if ((DataType != typeof(string)) && (DataType != typeof(SqlString))) 1146throw ExceptionBuilder.SetFailed(value, this, DataType, e); 1188throw ExceptionBuilder.SetFailed(value!, this, DataType, e); 1535clone.DataType = DataType; 1626DataStorage.IsTypeCustomType(DataType);
System\Data\DataColumnPropertyDescriptor.cs (1)
44public override Type PropertyType => Column.DataType;
System\Data\DataRelation.cs (4)
653if ((_parentKey.ColumnsReference[i].DataType != _childKey.ColumnsReference[i].DataType) || 654((_parentKey.ColumnsReference[i].DataType == typeof(DateTime)) && 819if (col.DataType != typeof(int))
System\Data\DataRow.cs (1)
1199throw ExceptionBuilder.UDTImplementsIChangeTrackingButnotIRevertible(dc.DataType.AssemblyQualifiedName!);
System\Data\DataTable.cs (3)
392info.AddValue(string.Format(formatProvider, "DataTable.DataColumn_{0}.DataType_AssemblyQualifiedName", i), Columns[i].DataType.AssemblyQualifiedName); 3930if (DataStorage.IsTypeCustomType(dc.DataType) && newValue != dc[record]) 4881DataColumn foreignKey = new DataColumn(keyName, parentKey.DataType, null, MappingType.Hidden);
System\Data\DataTableExtensions.cs (1)
129table.Columns.Add(column.ColumnName, column.DataType);
System\Data\DataTableReader.cs (3)
517return (_currentDataTable.Columns[ordinal].DataType); 799dr[DataType] = dc.DataType; 801if (dc.DataType == typeof(string))
System\Data\ForeignKeyConstraint.cs (3)
638if (_parentKey.ColumnsReference[i].DataType != _childKey.ColumnsReference[i].DataType || 639((_parentKey.ColumnsReference[i].DataType == typeof(DateTime)) && (_parentKey.ColumnsReference[i].DateTimeMode != _childKey.ColumnsReference[i].DateTimeMode) && ((_parentKey.ColumnsReference[i].DateTimeMode & _childKey.ColumnsReference[i].DateTimeMode) != DataSetDateTime.Unspecified)))
System\Data\Merger.cs (3)
380if (dest.DataType != src.DataType || 381((dest.DataType == typeof(DateTime)) && (dest.DateTimeMode != src.DateTimeMode) && ((dest.DateTimeMode & src.DateTimeMode) != DataSetDateTime.Unspecified)))
System\Data\ProviderBase\SchemaMapping.cs (4)
644if (typeof(System.Data.SqlTypes.SqlXml) == dataColumn.DataType) 648else if (typeof(System.Xml.XmlDocument) == dataColumn.DataType) 878if (typeof(System.Data.SqlTypes.SqlXml) == dataColumn.DataType) 882else if (typeof(System.Xml.XmlDocument) == dataColumn.DataType)
System\Data\Select.cs (2)
696((isLConst && !isRConst && (leftType == StorageType.String) && (rightType == StorageType.Guid) && (null != (namedNode = expr._right as NameNode)) && (namedNode._column!.DataType == typeof(Guid))) || 697(isRConst && !isLConst && (rightType == StorageType.String) && (leftType == StorageType.Guid) && (null != (namedNode = expr._left as NameNode)) && (namedNode._column!.DataType == typeof(Guid))))
System\Data\TypeLimiter.cs (3)
104/// Given a <see cref="DataTable"/>, returns all of the <see cref="DataColumn.DataType"/> 110? dataTable.Columns.Cast<DataColumn>().Select(column => column.DataType) 115/// Given a <see cref="DataSet"/>, returns all of the <see cref="DataColumn.DataType"/>
System\Data\XmlDataLoader.cs (1)
1169!((column.DataType == typeof(object)) || (typeName != null) || (xsiTypeString != null));
System\Data\XMLDiffLoader.cs (2)
387bool isPolymorphism = (column.DataType == typeof(object) || (row.GetAttribute(Keywords.MSD_INSTANCETYPE, Keywords.MSDNS) != null) || 441if (column.DataType == typeof(string))
System\Data\xmlsaver.cs (31)
198string dt = XmlDataTypeName(col!.DataType); 199if (bIsSqlType || (col.DataType == typeof(System.Numerics.BigInteger))) 201root.SetAttribute(Keywords.MSD_DATATYPE, Keywords.MSDNS, col.DataType.FullName); 203else if ((dt.Length == 0) || bImplementsInullable || ((dt == Keywords.XSD_ANYTYPE) && (col.XmlDataType != Keywords.XSD_ANYTYPE)) || (col.DataType == typeof(DateTimeOffset))) 210SetMSDataAttribute(root, col.DataType); 1316string typeName = XmlDataTypeName(col.DataType); // do not update the hashtable, as it will not write msdata:DataType 1319if (col.DataType == typeof(Guid) || col.DataType == typeof(Type)) 1327XmlTreeGen.ValidateColumnMapping(col.DataType); 1338if (col.DataType != typeof(string)) 1340string dt = XmlDataTypeName(col.DataType); 1341if ((col.IsSqlType && ((dt.Length == 0) || col.ImplementsINullable)) || (typeof(SqlXml) == col.DataType) || col.DataType == typeof(DateTimeOffset) || col.DataType == typeof(System.Numerics.BigInteger)) 1343root.SetAttribute(Keywords.MSD_DATATYPE, Keywords.MSDNS, col.DataType.FullName); 1352SetMSDataAttribute(root, col.DataType); 1379if (col.DataType == typeof(DateTime) && col.DateTimeMode != DataSetDateTime.UnspecifiedLocal) 1456if (col.DataType == typeof(bool)) 1460XmlTreeGen.ValidateColumnMapping(col.DataType); 1468XmlTreeGen.ValidateColumnMapping(col.DataType); 1471if (col.DataType == typeof(bool)) 1482if (col.DataType == typeof(bool)) 1622if (col.DataType != typeof(int)) 1814string _typeName = XmlDataTypeName(col.DataType); 1872XmlTreeGen.ValidateColumnMapping(colTxt.DataType); 2592if (!startElementSkipped && columnValue.GetType() != col.DataType) 2603if (columnValue.GetType() != col.DataType) 2962XmlTreeGen.ValidateColumnMapping(col.DataType); 2976XmlTreeGen.ValidateColumnMapping(col.DataType); 3023if (!startElementSkipped && valuesType != col.DataType) 3033if (value.GetType() != col.DataType)
System.Data.Odbc (2)
src\libraries\Common\src\System\Data\ProviderBase\DbMetaDataFactory.cs (2)
213DataColumn newDestinationColumn = new DataColumn(sourceColumn.ColumnName, sourceColumn.DataType); 237if ((null == collectionNameColumn) || (typeof(string) != collectionNameColumn.DataType))