DatasetQuery.Next Property
The value of the NextExecuted property is changed when the operation is concluded.
C# Example:
if (@Dataset.Query.Query1.Next.Equals(0)) @Dataset.Query.Query1.Next = 1; else @Dataset.Query.Query1.Next = 0;