232 Chapter 5
Storing and Retrieving Test Results
Using DataSets to Store and Retrieve Records
Using DataSets to Store and Retrieve
Records
DataSets can retrieve one or more records. VEE objects unpack the
records. Therefore, by storing records to DataSets instead of files, you do not
have to remember the data types. You can also perform sort and search
operations on the data, creating your own customized test database.
Lab 5-5: Using DataSets
A DataSet is simply an array of Records stored in a file. This exercise
shows how to get data into and out of a
DataSet.
Storing and Retrieving a Record from a DataSet
This exercise creates an array of ten Records, each containing three fields
with a test name, a
Real64 Scalar, and an array of Reals. It stores the
array of
Records in a DataSet, and retrieves the records and displays
them.
1. Select
Flow ⇒ Start. Select Flow ⇒ Repeat ⇒ For Count and
place the object under
Start. Select Device ⇒ Formula and place
the object to the right of
For Count. Connect Start to the sequence
input pin on
For Count; connect the For Count data output pin to
Formula data input pin.
2. Double-click the
Formula expression field to highlight the default
expression, and then type
“test” + a.
When you click
Start, the For Count object outputs integers zero
through nine sequentially to the
A pin of Formula. In the Formula
object, the integers are added to the word
“test” and output as Text
Scalars
: test0, test1, test2,...,test9. These values will fill the
first fields in the ten Records.