SiMX Help‎ > ‎The Target Platform‎ > ‎Objects‎ > ‎DB Object‎ > ‎

DB.GoRandom


Platform Objects


Description

Moves the current record position to the record identified by the record number that is passed to GoRandom as a parameter. Returns false if the record number parameter is less than 0 or greater than GetRecordCount - 1. Select should be called prior to this method.


Syntax


Function GoRandom(N)


Parameters


N (input) - a zero-based record position to set the current record position to; range: from 0 to (GetRecordCount - 1) 


Return value


none


Example

Code sample

If DB.Select() Then
   For I = 0 To 999 
     DB.GoRandom( I ) 
      DB.GetFieldValue( "Field1" ) 
   Next  
End If 


See also

Platform Objects and Methods
DB.sort
DB.AppendFinish