...
A Doc URI - this is the simplest way but the Doc URI is only executed when a form is submitted or a flow has completed it’s final step. When the user submits the form, the URI will be executed but now with the POST method selected from the dropdown. The database connector will than execute the Insert operation identified by the URI.
Code Block http://localhost:8082/database/BIRT/productDetails
A Live Forms business rule to pass the data to the database connector post using URL query parameters. One consideration when using this method is that URLs have a maximum length. This limits the number of URL parameters you can add therefore limiting the amount of fields you can send.
Code Block
Stored Procedures
You can also execute stored procedures via the database connector. Here is an example of a mySql stored procedure.
...
Code Block |
---|
<query name="customers"> <retrieve> <statement> SELECT * FROM customers WHERE emailAddr='%{domain}%' </statement> </retrieve> </query> |
if (trigger.clicked) {
var PostURL = 'http://localhost:8082/database/BIRT/productDetails?productCode=' + productCode.value + '&productName=' + productName.value + '&productLine=' + productLine.value + '&productScale=' + productScale.value + '&productVendor=' + productVendor.value + '&productDescription=' + productDescription.value + '&quantityInStock=' + quantityInStock.value + '&buyPrice = ' + buyPrice.value + '&MSRP = ' + MSRP.value;
http.post(PostURL);