Skip to content

Commit 219cfdf

Browse files
authoredNov 7, 2024··
Complete port of PR521 to netfx (#2964)
1 parent 2151501 commit 219cfdf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlDataReader.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3043,7 +3043,7 @@ virtual public int GetSqlValues(object[] values)
30433043

30443044
for (int i = 0; i < copyLen; i++)
30453045
{
3046-
values[_metaData.GetVisibleColumnIndex(i)] = GetSqlValueInternal(i);
3046+
values[i] = GetSqlValueInternal(_metaData.GetVisibleColumnIndex(i));
30473047
}
30483048
return copyLen;
30493049
}
@@ -3487,7 +3487,7 @@ override public int GetValues(object[] values)
34873487
// If this is sequential access, then we need to wipe the internal buffer
34883488
if ((sequentialAccess) && (i < maximumColumn))
34893489
{
3490-
_data[i].Clear();
3490+
_data[fieldIndex].Clear();
34913491
if (fieldIndex > i && fieldIndex > 0)
34923492
{
34933493
// if we jumped an index forward because of a hidden column see if the buffer before the

0 commit comments

Comments
 (0)
Please sign in to comment.