guides:programming:programmers_reference_manual:select

Select statement

Creates a latent cursor of keys for an opened native table.

Select table_var

The Select statement has the following parameters.

ParameterDescription
table_varContains a file variable that was returned from a previous Open statement.

Note: Do not add rows to a table while using the Select…ReadNext process. The addition of keys to the table can generate unpredictable results.

The order the keys are returned in is dependent on the filing system.

Processing the CUSTOMERS table

declare function Set_FSError

open "CUSTOMERS" To customers_table else

   status = Set_FSError()

   return

end

 

select customers_table

  

Done = 0

loop

ReadNext @ID else Done = 1

Until Done Do

   read @RECORD From customers_table, @ID else

     status = Set_FSError()

     return

   end

 

   * processing logic here ...

   GoSub PROCESS

Repeat

return 0

 

PROCESS:

   /* process the row */

return
  • guides/programming/programmers_reference_manual/select.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1