@@ -119,7 +119,10 @@ public void SqlRecordFillTest()
119119
120120 record . SetSqlMoney ( 12 , SqlMoney . MaxValue ) ;
121121 Assert . Equal ( SqlMoney . MaxValue , record . GetSqlMoney ( 12 ) ) ;
122+
123+ int offset = 1 ;
122124#if NET
125+ offset = 3 ;
123126 record . SetValue ( 14 , new DateOnly ( 2025 , 11 , 28 ) ) ;
124127 Assert . Equal ( new DateTime ( 2025 , 11 , 28 ) , record . GetValue ( 14 ) ) ;
125128
@@ -128,11 +131,11 @@ public void SqlRecordFillTest()
128131#endif
129132
130133 // Try adding different values to SqlVariant type
131- for ( int i = 0 ; i < record . FieldCount - 3 ; ++ i )
134+ for ( int i = 0 ; i < record . FieldCount - offset ; ++ i )
132135 {
133136 object valueToSet = record . GetSqlValue ( i ) ;
134- record . SetValue ( record . FieldCount - 3 , valueToSet ) ;
135- object o = record . GetSqlValue ( record . FieldCount - 3 ) ;
137+ record . SetValue ( record . FieldCount - offset , valueToSet ) ;
138+ object o = record . GetSqlValue ( record . FieldCount - offset ) ;
136139
137140 if ( o is SqlBinary )
138141 {
@@ -143,8 +146,8 @@ public void SqlRecordFillTest()
143146 Assert . Equal ( valueToSet , o ) ;
144147 }
145148
146- record . SetDBNull ( record . FieldCount - 3 ) ;
147- Assert . Equal ( DBNull . Value , record . GetSqlValue ( record . FieldCount - 3 ) ) ;
149+ record . SetDBNull ( record . FieldCount - offset ) ;
150+ Assert . Equal ( DBNull . Value , record . GetSqlValue ( record . FieldCount - offset ) ) ;
148151
149152 record . SetDBNull ( i ) ;
150153 Assert . Equal ( DBNull . Value , record . GetValue ( i ) ) ;
0 commit comments