10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ArraysHow You Can Delete Rows in an ArrayWhen you want to delete rows from an array and do not need to keep track ofthe deleted rows, use either of the following methods:• The RemoveRow method to delete rows one row at a timeThe syntax for the RemoveRow method is:integer = ArrayObject.RemoveRow(rownumber = integer)You must include the rownumber parameter to identify the row to bedeleted.If the row is deleted successfully, the method returns ER_OK. If the row isnot found, the method returns ER_ROWNOTFOUND.After the specified row is deleted, OpenROAD adjusts the numbers of therows that followed the deleted row. For example, if you remove rownumber 5, then the current row 6 becomes the new row number 5.• The Clear method to delete all the rows at onceThe syntax for the Clear method is:integer = ArrayObject.Clear()Both of these methods actually delete rows from the array (and any associatedtable field display), rather than just marking the rows deleted. Rows that havea _RowState value of RS_DELETED as well as those with positive sequencenumbers are deleted.How You Can Retrieve Array InformationIt is useful for the control flow of a program to know how many rows are in anarray or whether or not all rows have been processed. The ArrayObject classhas three attributes that contain quantitative information about an array. Eachof these attributes is an integer value that provides some information aboutthe specified array.Working with Arrays, Table Fields, and Collections 221

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!