File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,9 @@ function Invoke-DBOQuery {
254
254
Unregister-Event - SourceIdentifier " DBOpsMessaging"
255
255
}
256
256
$reader = $readerTask.GetAwaiter ().GetResult()
257
+ $setCounter = 0
257
258
do {
259
+ $setCounter ++
258
260
$table = [System.Data.DataTable ]::new()
259
261
$definition = $reader.GetSchemaTable ()
260
262
foreach ($column in $definition ) {
@@ -269,13 +271,16 @@ function Invoke-DBOQuery {
269
271
$null = $table.Columns.Add ($name , $datatype )
270
272
}
271
273
# read rows async and assign values
274
+ $rowCount = 0
272
275
while ($reader.ReadAsync ().GetAwaiter().GetResult()) {
276
+ $rowCount ++
273
277
$row = $table.NewRow ()
274
278
for ($i = 0 ; $i -lt $reader.FieldCount ; $i ++ ) {
275
279
$row [$table.Columns [$i ].ColumnName ] = $reader.GetValue ($i );
276
280
}
277
281
$table.Rows.Add ($row )
278
282
}
283
+ Write-PSFMessage - Level Debug - Message " Received $rowCount rows from resultset $setCounter "
279
284
$ds.Tables.Add ($table )
280
285
} while ($reader.NextResult ())
281
286
$reader.Close ()
You can’t perform that action at this time.
0 commit comments