File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/FirebirdSql.Data.FirebirdClient/FirebirdClient Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -558,6 +558,10 @@ public int GetCurrentBatchSize()
558558 {
559559 throw new InvalidOperationException ( "Batch must be prepared." ) ;
560560 }
561+ if ( ! HasParameters )
562+ {
563+ return 0 ;
564+ }
561565 return _batch . ComputeBatchSize ( _batchParameters . Count , this ) ;
562566 }
563567 public async Task < int > GetCurrentBatchSizeAsync ( CancellationToken cancellationToken = default )
@@ -566,6 +570,10 @@ public async Task<int> GetCurrentBatchSizeAsync(CancellationToken cancellationTo
566570 {
567571 throw new InvalidOperationException ( "Batch must be prepared." ) ;
568572 }
573+ if ( ! HasParameters )
574+ {
575+ return 0 ;
576+ }
569577 return await _batch . ComputeBatchSizeAsync ( _batchParameters . Count , this , cancellationToken ) . ConfigureAwait ( false ) ;
570578 }
571579
You can’t perform that action at this time.
0 commit comments