... Please click [here|SQLPlus DSC] for full reference on SQLPlus DSC.
h2. Using the Avoka SQL-Plus DSC
You can insert data retrieved from a database as repeating XML fragments into a PDF form. Suppose you created a [form|^SQLPlusTestForm.pdf] using the following XML [schema|^people.xsd]. The following process [sample|^sql_plus_test.lca] demonstrates how to retrieve data from a database and insert the data into the form. You can import this archive file using archive manager and open it in the process designer.
First, we create a variable, called 'form_variable' of type 'xfaForm' and specify its properties as shown on the following picture. \\
!variable.jpg!
\\
The process workflow looks similar to the following. \\
!workflow.jpg!
\\ |
In the first step of the process we retrieve data from the database and insert into the form. The following picture shows settings to retrieve the data.
|
| \\
!sql_info.jpg! |
\\ |
... Optionally, you can check the 'prepared SQL statement' box to create a prepared SQL statement and specify query parameters. To test your statement, click the 'Test' button. This will display the first row of the result set retrieved from the database. |
The following picture shows settings to insert data from the database into the form variable.
|
| \\
!xml_info.jpg!\\ |
| |
| After we run the process and open
the 'To
Do' list in the workspace, we can see that the form has been populated with the data from the database. |
| |
| \\
!populated_form.jpg! |
\\ |
... Similarly, you can populate any XML process variable with data retrieved from a database. |