diff --git a/Snowflake.Data/Core/ResultSetUtil.cs b/Snowflake.Data/Core/ResultSetUtil.cs index 4384f1b29..236efab9c 100755 --- a/Snowflake.Data/Core/ResultSetUtil.cs +++ b/Snowflake.Data/Core/ResultSetUtil.cs @@ -36,18 +36,11 @@ internal static int CalculateUpdateCount(this SFBaseResultSet resultSet) var index = resultSet.sfResultSetMetaData.GetColumnIndexByName("rows_loaded"); if (index >= 0) { - int rewindCount = 1; while (resultSet.Next()) { updateCount += resultSet.GetInt64(index); - rewindCount++; - } - - while (rewindCount > 0) - { - resultSet.Rewind(); - rewindCount--; } + while (resultSet.Rewind()) {} } break; case SFStatementType.COPY_UNLOAD: