@@ -268,7 +268,7 @@ internal virtual SmiExtendedMetaData[] GetInternalSmiMetaData()
268268 {
269269 _SqlMetaData colMetaData = metaData [ index ] ;
270270
271- if ( ! colMetaData . isHidden )
271+ if ( ! colMetaData . IsHidden )
272272 {
273273 SqlCollation collation = colMetaData . collation ;
274274
@@ -278,17 +278,17 @@ internal virtual SmiExtendedMetaData[] GetInternalSmiMetaData()
278278
279279 if ( SqlDbType . Xml == colMetaData . type )
280280 {
281- typeSpecificNamePart1 = colMetaData . xmlSchemaCollectionDatabase ;
282- typeSpecificNamePart2 = colMetaData . xmlSchemaCollectionOwningSchema ;
283- typeSpecificNamePart3 = colMetaData . xmlSchemaCollectionName ;
281+ typeSpecificNamePart1 = colMetaData . xmlSchemaCollection ? . Database ;
282+ typeSpecificNamePart2 = colMetaData . xmlSchemaCollection ? . OwningSchema ;
283+ typeSpecificNamePart3 = colMetaData . xmlSchemaCollection ? . Name ;
284284 }
285285 else if ( SqlDbType . Udt == colMetaData . type )
286286 {
287287 Connection . CheckGetExtendedUDTInfo ( colMetaData , true ) ; // Ensure that colMetaData.udtType is set
288288
289- typeSpecificNamePart1 = colMetaData . udtDatabaseName ;
290- typeSpecificNamePart2 = colMetaData . udtSchemaName ;
291- typeSpecificNamePart3 = colMetaData . udtTypeName ;
289+ typeSpecificNamePart1 = colMetaData . udt ? . DatabaseName ;
290+ typeSpecificNamePart2 = colMetaData . udt ? . SchemaName ;
291+ typeSpecificNamePart3 = colMetaData . udt ? . TypeName ;
292292 }
293293
294294 int length = colMetaData . length ;
@@ -310,26 +310,27 @@ internal virtual SmiExtendedMetaData[] GetInternalSmiMetaData()
310310 colMetaData . scale ,
311311 ( null != collation ) ? collation . LCID : _defaultLCID ,
312312 ( null != collation ) ? collation . SqlCompareOptions : SqlCompareOptions . None ,
313- colMetaData . udtType ,
313+ colMetaData . udt ? . Type ,
314314 false , // isMultiValued
315315 null , // fieldmetadata
316316 null , // extended properties
317317 colMetaData . column ,
318318 typeSpecificNamePart1 ,
319319 typeSpecificNamePart2 ,
320320 typeSpecificNamePart3 ,
321- colMetaData . isNullable ,
321+ colMetaData . IsNullable ,
322322 colMetaData . serverName ,
323323 colMetaData . catalogName ,
324324 colMetaData . schemaName ,
325325 colMetaData . tableName ,
326326 colMetaData . baseColumn ,
327- colMetaData . isKey ,
328- colMetaData . isIdentity ,
329- 0 == colMetaData . updatability ,
330- colMetaData . isExpression ,
331- colMetaData . isDifferentName ,
332- colMetaData . isHidden ) ;
327+ colMetaData . IsKey ,
328+ colMetaData . IsIdentity ,
329+ colMetaData . IsReadOnly ,
330+ colMetaData . IsExpression ,
331+ colMetaData . IsDifferentName ,
332+ colMetaData . IsHidden
333+ ) ;
333334 }
334335 }
335336 }
@@ -573,14 +574,14 @@ internal DataTable BuildSchemaTable()
573574 if ( col . type == SqlDbType . Udt )
574575 { // Additional metadata for UDTs.
575576 Debug . Assert ( Connection . IsKatmaiOrNewer , "Invalid Column type received from the server" ) ;
576- schemaRow [ udtAssemblyQualifiedName ] = col . udtAssemblyQualifiedName ;
577+ schemaRow [ udtAssemblyQualifiedName ] = col . udt ? . AssemblyQualifiedName ;
577578 }
578579 else if ( col . type == SqlDbType . Xml )
579580 { // Additional metadata for Xml.
580581 Debug . Assert ( Connection . IsKatmaiOrNewer , "Invalid DataType (Xml) for the column" ) ;
581- schemaRow [ xmlSchemaCollectionDatabase ] = col . xmlSchemaCollectionDatabase ;
582- schemaRow [ xmlSchemaCollectionOwningSchema ] = col . xmlSchemaCollectionOwningSchema ;
583- schemaRow [ xmlSchemaCollectionName ] = col . xmlSchemaCollectionName ;
582+ schemaRow [ xmlSchemaCollectionDatabase ] = col . xmlSchemaCollection ? . Database ;
583+ schemaRow [ xmlSchemaCollectionOwningSchema ] = col . xmlSchemaCollection ? . OwningSchema ;
584+ schemaRow [ xmlSchemaCollectionName ] = col . xmlSchemaCollection ? . Name ;
584585 }
585586 }
586587 else
@@ -613,19 +614,19 @@ internal DataTable BuildSchemaTable()
613614 schemaRow [ scale ] = col . metaType . Scale ;
614615 }
615616
616- schemaRow [ allowDBNull ] = col . isNullable ;
617+ schemaRow [ allowDBNull ] = col . IsNullable ;
617618
618619 // If no ColInfo token received, do not set value, leave as null.
619620 if ( _browseModeInfoConsumed )
620621 {
621- schemaRow [ isAliased ] = col . isDifferentName ;
622- schemaRow [ isKey ] = col . isKey ;
623- schemaRow [ isHidden ] = col . isHidden ;
624- schemaRow [ isExpression ] = col . isExpression ;
622+ schemaRow [ isAliased ] = col . IsDifferentName ;
623+ schemaRow [ isKey ] = col . IsKey ;
624+ schemaRow [ isHidden ] = col . IsHidden ;
625+ schemaRow [ isExpression ] = col . IsExpression ;
625626 }
626627
627- schemaRow [ isIdentity ] = col . isIdentity ;
628- schemaRow [ isAutoIncrement ] = col . isIdentity ;
628+ schemaRow [ isIdentity ] = col . IsIdentity ;
629+ schemaRow [ isAutoIncrement ] = col . IsIdentity ;
629630
630631 schemaRow [ isLong ] = col . metaType . IsLong ;
631632
@@ -641,8 +642,8 @@ internal DataTable BuildSchemaTable()
641642 schemaRow [ isRowVersion ] = false ;
642643 }
643644
644- schemaRow [ isReadOnly ] = ( 0 == col . updatability ) ;
645- schemaRow [ isColumnSet ] = col . isColumnSet ;
645+ schemaRow [ isReadOnly ] = col . IsReadOnly ;
646+ schemaRow [ isColumnSet ] = col . IsColumnSet ;
646647
647648 if ( ! string . IsNullOrEmpty ( col . serverName ) )
648649 {
@@ -1095,7 +1096,7 @@ private bool TryConsumeMetaData()
10951096 {
10961097 indexMap [ i ] = _metaData . visibleColumns ;
10971098
1098- if ( ! ( _metaData [ i ] . isHidden ) )
1099+ if ( ! ( _metaData [ i ] . IsHidden ) )
10991100 {
11001101 _metaData . visibleColumns ++ ;
11011102 }
@@ -1148,7 +1149,7 @@ private string GetDataTypeNameInternal(_SqlMetaData metaData)
11481149
11491150 if ( metaData . type == SqlDbType . Udt )
11501151 {
1151- dataTypeName = metaData . udtDatabaseName + "." + metaData . udtSchemaName + "." + metaData . udtTypeName ;
1152+ dataTypeName = metaData . udt ? . DatabaseName + "." + metaData . udt ? . SchemaName + "." + metaData . udt ? . TypeName ;
11521153 }
11531154 else
11541155 { // For all other types, including Xml - use data in MetaType.
@@ -1221,7 +1222,7 @@ private Type GetFieldTypeInternal(_SqlMetaData metaData)
12211222 if ( metaData . type == SqlDbType . Udt )
12221223 {
12231224 Connection . CheckGetExtendedUDTInfo ( metaData , false ) ;
1224- fieldType = metaData . udtType ;
1225+ fieldType = metaData . udt ? . Type ;
12251226 }
12261227 else
12271228 { // For all other types, including Xml - use data in MetaType.
@@ -1301,7 +1302,7 @@ private Type GetProviderSpecificFieldTypeInternal(_SqlMetaData metaData)
13011302 if ( metaData . type == SqlDbType . Udt )
13021303 {
13031304 Connection . CheckGetExtendedUDTInfo ( metaData , false ) ;
1304- providerSpecificFieldType = metaData . udtType ;
1305+ providerSpecificFieldType = metaData . udt ? . Type ;
13051306 }
13061307 else
13071308 {
@@ -4968,10 +4969,10 @@ private ReadOnlyCollection<DbColumn> BuildColumnSchema()
49684969
49694970 if ( _browseModeInfoConsumed )
49704971 {
4971- dbColumn . SqlIsAliased = col . isDifferentName ;
4972- dbColumn . SqlIsKey = col . isKey ;
4973- dbColumn . SqlIsHidden = col . isHidden ;
4974- dbColumn . SqlIsExpression = col . isExpression ;
4972+ dbColumn . SqlIsAliased = col . IsDifferentName ;
4973+ dbColumn . SqlIsKey = col . IsKey ;
4974+ dbColumn . SqlIsHidden = col . IsHidden ;
4975+ dbColumn . SqlIsExpression = col . IsExpression ;
49754976 }
49764977
49774978 dbColumn . SqlDataType = GetFieldTypeInternal ( col ) ;
0 commit comments