From 221f90b71d51febbcf32a35bdd018d93d1533e8e Mon Sep 17 00:00:00 2001 From: Louie Farol Date: Fri, 25 Oct 2024 10:12:50 -0700 Subject: [PATCH] Put rewind in while loop --- Snowflake.Data/Core/ResultSetUtil.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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: