UniDAC

TCustomUniDataSet.OpenNext Method

Provides second and other result sets while executing multiresult query.

Class

TCustomUniDataSet

Syntax

function OpenNext: boolean;

Return Value
True, if DataSet opens. If there are no record sets to be represented, it will return False and the current record set will be closed.

Remarks

Call the OpenNext method to get second and other result sets while executing multiresult query. If DataSet opens, it returns True. If there are no record sets to be represented, it will return False and the current record set will be closed.

Example

Here is a small piece of code that demonstrates the approach of working with multiple datasets returned by a multi-statement query:

   UniQuery.SQL.Clear;
   UniQuery.SQL.Add('SELECT * FROM Table1;');
   UniQuery.SQL.Add('SELECT * FROM Table2;');
   UniQuery.SQL.Add('SELECT * FROM Table3;');
   UniQuery.SQL.Add('SELECT * FROM Table4;');
   UniQuery.SQL.Add('SELECT * FROM Table5;');
   UniQuery.FetchAll := False;
   UniQuery.Open;
   repeat
      //   < do something >
      until not UniQuery.OpenNext; 
© 1997-2020 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback