version 2003
PA_NextRecord (tableNum)
Parameter | Type | Description | |
tableNum | short | Table number |
Description
The command PA_NextRecord moves the current record pointer to the record following the current record in the table number tableNum. After the 4D plug-in calls PA_NextRecord it should use PA_EndSelection to determine if the current record pointer has passed the end of the selection for the table passed into tableNum.
Before calling PA_NextRecord the 4D plug-in should indicate if the many-to-one and one-to many relations should be activated by using PA_UseAutomaticRelations.
WARNING
This routine does not use virtual structure
Example
Do something with a selection of records.
void DoSomethingWithTheSelection (short tableNum) { // we do not want to activate the relations PA_AutomaticRelation(0, 0); // Start to the first record of the selection PA_FirstRecord(tableNum); // While the end of selection not reached... while(!PA_EndSelection(tableNum)) { PA_Yield(); // Give time to other tasks /* ...do something with the record (PA_SaveRecord can be called here). */ // Time to go to the next record PA_NextRecord(tableNum); } }
See Also
PA_EndSelection, PA_FirstRecord, PA_PreviousRecord, PA_UseAutomaticRelations.
Error Handling
Use PA_GetLastError to see if an error occurred
Current Selections and Records
The current record is changed to the next one in the selection, or none if PA_NextRecord is called for the last record (PA_EndSelection returns 1).