Recordset built-in tag

Usage:
<Recordset Name=value [BasedOn=value]>

Name

The name of the recordset (internal to Arcos).

BasedOn

This is optional. It creates a recordset that encompasses the entire table on which it is based, plus any additional fields that you define later in the recordset (see Example 1). You can override the properties for fields that are defined in a table (see Example 2).

You can order results of a recordset. This is done in a similar manner to ordering results in a table.

Example 1

Here is the table definition:

<Database Name="AName" Type="postgres"  Login="mylogin" Password="mypassword" Source="" >
   <Table IntTableName="tblTest" DBTableName="tblTest">
      <Field Name="TestField1" Type="string"  Size="20" ShowSize="40" Caption="Field 1" />
      <Field Name="TestField2" Type="string"  Size="20" ShowSize="40" Caption="Field 2" />
      <Field Name="TestField3" Type="string"  Size="20" ShowSize="40" Caption="Field 3" />
      <Index Name="primary" Field="TestField1" />
   </Table>
</Database>

The recordset below includes all fields from the table (using the BasedOn property) and adds a field from another table, and a field for user input (that is, a field that is not bound to any table).

<Recordset Name="rstTest"  BasedOn="tblTest" >
   <Item FieldName="InputField" Type="integer" maxlength="3" ShowSize="6" Caption="Age" />
   <Item FieldName="SomeField" TableName="SomeTable" />
</Recordset>

Example 2

This recordset overrides some of the properties for fields that are defined in the table.

<Recordset Name="rstTest2">
   <!-- Use the values specified in the table definition -->
   <Item FieldName="TestField1" TableName="tblTest" />
   
   <!-- Change the Caption and ShowSize -->
   <Item FieldName="TestField2" TableName="tblTest" Caption="New caption" ShowSize="80" />
   
   <!-- Change the DisplayAs type, and supply the new parameters (Rows, Cols) that it accepts -->
   <Item FieldName="TestField3" TableName="tblTest" DisplayAs="textarea" Rows="6" Cols="40" />
</Recordset>