1 write to SqlDbType
System.Data (1)
fx\src\data\System\Data\SqlClient\SqlEnums.cs (1)
72
this.
SqlDbType
= sqldbType;
94 references to SqlDbType
System.Data (94)
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (7)
649
else if(metadata.metaType.IsPlp && metadata.metaType.
SqlDbType
!= SqlDbType.Xml) {
1114
if ((metadata.type == SqlDbType.VarBinary) && (mtSource.IsBinType) && (mtSource.
SqlDbType
!= SqlDbType.Timestamp) && _SqlDataReaderRowSource.IsCommandBehavior(CommandBehavior.SequentialAccess)) {
1119
else if (((metadata.type == SqlDbType.VarChar) || (metadata.type == SqlDbType.NVarChar)) && (mtSource.IsCharType) && (mtSource.
SqlDbType
!= SqlDbType.Xml)) {
1123
else if ((metadata.type == SqlDbType.Xml) && (mtSource.
SqlDbType
== SqlDbType.Xml)) {
1336
mt = MetaType.GetMetaTypeFromSqlDbType(type.
SqlDbType
, false);
1401
mt = MetaType.GetMetaTypeFromSqlDbType (type.
SqlDbType
, false);
1407
mt = MetaType.GetMetaTypeFromSqlDbType(type.
SqlDbType
, false);
fx\src\data\System\Data\SqlClient\SqlCommand.cs (8)
5769
if (mt.
SqlDbType
== SqlDbType.Udt) {
5776
else if (mt.
SqlDbType
== SqlDbType.Structured) {
5798
if (mt.
SqlDbType
== SqlDbType.Decimal) {
5824
else if (false == mt.IsFixed && false == mt.IsLong && mt.
SqlDbType
!= SqlDbType.Timestamp && mt.
SqlDbType
!= SqlDbType.Udt && SqlDbType.Structured != mt.
SqlDbType
) {
5861
else if (mt.IsPlp && (mt.
SqlDbType
!= SqlDbType.Xml) && (mt.
SqlDbType
!= SqlDbType.Udt)) {
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (11)
582
schemaRow[ProviderType] = GetVersionedMetaType(col.metaType).
SqlDbType
;
1434
if (mt.
SqlDbType
!= SqlDbType.Xml) {
1470
if (((!mt.IsBinType) || (mt.
SqlDbType
== SqlDbType.Timestamp)) && (mt.
SqlDbType
!= SqlDbType.Variant)) {
1475
if ((mt.
SqlDbType
!= SqlDbType.Variant) && (IsCommandBehavior(CommandBehavior.SequentialAccess))) {
1512
if (!(mt.IsLong || mt.IsBinType) || (SqlDbType.Xml == mt.
SqlDbType
)) {
1886
if (((!mt.IsCharType) && (mt.
SqlDbType
!= SqlDbType.Variant)) || (mt.
SqlDbType
== SqlDbType.Xml)) {
1891
if ((mt.
SqlDbType
!= SqlDbType.Variant) && (IsCommandBehavior(CommandBehavior.SequentialAccess))) {
3589
if ((metaType.IsLong) || (metaType.IsPlp) || (metaType.
SqlDbType
== SqlDbType.Udt) || (metaType.
SqlDbType
== SqlDbType.Structured)) {
fx\src\data\System\Data\SqlClient\SqlEnums.cs (5)
87
Is70Supported = _Is70Supported(
SqlDbType
);
88
Is80Supported = _Is80Supported(
SqlDbType
);
89
Is90Supported = _Is90Supported(
SqlDbType
);
90
Is100Supported = _Is100Supported(
SqlDbType
);
256
switch (mt.
SqlDbType
) {
fx\src\data\System\Data\SqlClient\SqlParameter.cs (47)
348
maxlen = MSS.SmiMetaData.GetDefaultForType( mt.
SqlDbType
).MaxLength;
350
return new SqlMetaData(this.ParameterName, mt.
SqlDbType
, maxlen, GetActualPrecision(), GetActualScale(), LocaleId, CompareInfo,
386
if ( SqlDbType.NChar == mt.
SqlDbType
|| SqlDbType.NVarChar == mt.
SqlDbType
) {
397
if ( SqlDbType.Binary == mt.
SqlDbType
|| SqlDbType.VarBinary == mt.
SqlDbType
) {
400
else if ( SqlDbType.Char == mt.
SqlDbType
|| SqlDbType.VarChar == mt.
SqlDbType
) {
403
else if ( SqlDbType.NChar == mt.
SqlDbType
|| SqlDbType.NVarChar == mt.
SqlDbType
) {
407
else if (( maxLen > MSS.SmiMetaData.MaxBinaryLength && ( SqlDbType.Binary == mt.
SqlDbType
|| SqlDbType.VarBinary == mt.
SqlDbType
))
408
|| ( maxLen > MSS.SmiMetaData.MaxANSICharacters && ( SqlDbType.Char == mt.
SqlDbType
|| SqlDbType.VarChar == mt.
SqlDbType
))
409
|| ( maxLen > MSS.SmiMetaData.MaxUnicodeCharacters&& ( SqlDbType.NChar == mt.
SqlDbType
|| SqlDbType.NVarChar == mt.
SqlDbType
)) ) {
432
compareOpts = MSS.SmiMetaData.GetDefaultForType( mt.
SqlDbType
).CompareOptions;
440
if (SqlDbType.Xml == mt.
SqlDbType
) {
445
else if (SqlDbType.Udt == mt.
SqlDbType
|| (SqlDbType.Structured == mt.
SqlDbType
&& !ADP.IsEmpty(this.TypeName))) {
449
if (SqlDbType.Udt == mt.
SqlDbType
) {
483
if ( SqlDbType.Decimal == mt.
SqlDbType
) {
492
if (SqlDbType.Structured == mt.
SqlDbType
) {
496
return new MSS.SmiParameterMetaData( mt.
SqlDbType
,
503
SqlDbType.Structured == mt.
SqlDbType
,
635
return GetMetaTypeOnly().
SqlDbType
;
649
if ((null == metatype) || (metatype.
SqlDbType
!= value)) {
689
SqlDbType sqlDbType = GetMetaTypeOnly().
SqlDbType
;
779
if (_internalMetaType.
SqlDbType
== Data.SqlDbType.Udt) {
791
SqlDbType actualType = mt.
SqlDbType
;
806
actualType = MetaType.GetSqlDataType(mt.TDSType, 0 /*no user type*/, 0 /*non-nullable type*/).
SqlDbType
;
908
((currentType != destinationType.SqlType) || (SqlDbType.Xml == destinationType.
SqlDbType
))) { // Special case for Xml types (since we need to convert SqlXml into a string)
949
else if ((typeof(string) == currentType) && (SqlDbType.Time == destinationType.
SqlDbType
)) {
952
else if ((typeof(string) == currentType) && (SqlDbType.DateTimeOffset == destinationType.
SqlDbType
)) {
955
else if ((typeof(DateTime) == currentType) && (SqlDbType.DateTimeOffset == destinationType.
SqlDbType
)) {
1349
if ((null == _coercedValue) || (_internalMetaType.
SqlDbType
== Data.SqlDbType.Udt)) { // will also be set during parameter Validation
1408
return metaType.
SqlDbType
;
1447
else if ( (!ShouldSerializePrecision() && !ShouldSerializeScale()) && (_metaType.
SqlDbType
== SqlDbType.Decimal) ) {
1497
if (metaType.
SqlDbType
!= SqlDbType.Udt && Direction != ParameterDirection.Output) {
1502
if (metaType.
SqlDbType
== SqlDbType.Udt) {
1511
if (metaType.
SqlDbType
== SqlDbType.Structured) {
1537
if ((SqlDbType.Udt != mt.
SqlDbType
) && (false == mt.IsFixed) && (false == mt.IsLong)) { // if type has 2 byte length
1578
if (mt.
SqlDbType
== SqlDbType.Xml) {
1581
if (mt.
SqlDbType
== SqlDbType.NVarChar
1582
|| mt.
SqlDbType
== SqlDbType.VarChar
1583
|| mt.
SqlDbType
== SqlDbType.VarBinary) {
1589
switch (mt.
SqlDbType
) { // widening the SqlDbType is automatic
fx\src\data\System\Data\SqlClient\TdsParser.cs (16)
3432
rec.type = rec.metaType.
SqlDbType
;
4159
col.type = col.metaType.
SqlDbType
;
4241
switch (col.metaType.
SqlDbType
)
8207
if (mt.
SqlDbType
== SqlDbType.Decimal) {
8370
if (mt.
SqlDbType
== SqlDbType.Timestamp) {
8373
else if (mt.
SqlDbType
== SqlDbType.Udt) {
8427
if (mt.
SqlDbType
!= SqlDbType.Xml)
8430
else if ((!mt.IsVarTime) && (mt.
SqlDbType
!= SqlDbType.Date)) { // Time, Date, DateTime2, DateTimeoffset do not have the size written out
8445
if (mt.
SqlDbType
== SqlDbType.Decimal) {
8463
if (_isYukon && (mt.
SqlDbType
== SqlDbType.Xml)) {
9580
((metatype.
SqlDbType
== SqlDbType.VarBinary && value is StreamDataFeed) ||
9581
((metatype.
SqlDbType
== SqlDbType.VarChar || metatype.
SqlDbType
== SqlDbType.NVarChar) && value is TextDataFeed) ||
9582
(metatype.
SqlDbType
== SqlDbType.Xml && value is XmlDataFeed)),
9590
switch (metatype.
SqlDbType
) {
9615
else if (metatype.
SqlDbType
!= SqlDbType.Udt || metatype.IsLong) {