Adding a New Record to a Database Table

Use the Record tag to add a new record to the database.

The field, or group of fields, enclosed by a Record tag is added as a new record to the database.  Consequently, there is no “source” for the data to be displayed because the particular control or associated group of controls is displayed without any pre-set data.

<GEN:Record Name=”Customer”>

        <td><GEN:FieldValue Name="FirstName"/></td>

        <td><GEN:FieldValue Name="LastName"/></td>

        <td><GEN:FieldValue Name="Address"/></td>

        <td><GEN:FieldValue Name="City"/></td>

        <td><GEN:FieldValue Name="State"/></td>

        <td><GEN:FieldValue Name="ZipCode"/></td>

        <td><GEN:FieldValue Name="Country"/></td>

</GEN:Record>

Code generation tags can both display data as well as input data, depending on their property settings.  Either way, there is no difference in how the code generation tags are used in your layout page.

In this example, the name, address, and other contact information is collected from the web page and inserted into the Customers table in the database.  The Record code generation tag is bound to the Customers table.  The individual FieldValue tags would typically have their query bound to “Add new record”.

See Also

Query Properties