Using field symbols and data references to print database table contents
Field symbols and references are an important combination for dynamic programming. Data references are addresses of data objects stored in reference variables. Field symbols are placeholders, or symbolic representations of these data objects.
This recipe shows how to print all the contents of a particular database table (the name of which is only known at runtime). For simplicity sake, we will only focus on the main logic pertaining to dynamic programming. In addition to data references and field symbols, we will also see some dynamic SQL statement application.
Getting ready
The code will let you create a small data browser program that will take as input the database table name whose contents are to be read, and the number of rows and columns (fields) to be displayed. The output displays the table's field names as column headers along with the data stored in the table.
The knowledge of the describe_by_data
method of the...