Storing data

There are many reasons why you have to store data in a merge project. On example is the Form Receiver where you probably want to store the data that has been filled out by the end user.
variaDoc gives you various options for data storage.

Store data in an SQL database

You can store data into an SQL based database. This typically involves inserting rows in one or more tables, updating other rows and perhaps deleting rows.
This can all be done in the Store data node. It opens a single connection to a database and then executes its child nodes in a single database transaction. This ensures that if an error occurs, all changes can be rolled back.
Here's a sample of the use of the Store data node.
In this example the Store data node first uses a data node to select a new ID for the rows that will be inserted. It then inserts a row into the Submissions table. Finally it inserts zero or more rows into the emp-codes table. If all inserts succeed, the transaction is committed.

Store data as an XML document

Data can also be stored as an XML document. variaDoc enables you to create XML documents and export them to one or more destinations (just like PDF output documents). The structure of the XML document is described in the merge project using Element and Attribute nodes.
Here's a sample of the creation of an XML document:
This sample results in an XML document that looks like this:
<Order id="1234">

   <OrderItem name="bread" price="2.2" />

Write data to a text file

Unstructured data can be written to a text file using the Write text file node.