ExportToDatabase actions

This action library used to export the page level and field level values into the table in Database.

The action DatabaseOpenConnection connects the databases using the connection string which is passed to this action and opens the connection. This action supports smart parameters. Similarly DatabaseCloseConnection() closes the existing open connection.

Note: The ExportToDatabase action library is 64-bit action library. While using the library ensure that the 64 bit database (db2,MSAccess,SQL Server, Oracle) driver is installed properly.

SetTableName: The action SetTableName confirms whether the table name is present in database or not. If not then the action returns False. This action should be called before exporting any values into the table. The below example checks whether the Export_Results table is present in the database or not. If not then the action returns false, otherwise true, and then moves to the next action.
SetTableName("Export_Results")
ExportFieldToColumn("MyDate", "db_Date")
AddRecord()

ExportToColumn: A field-level action that exports the captured value of the current Field object from the page's Data file to a target column within a previously designated table of an open Export database.

ExportFieldToColumn: A page-level action that extracts the captured value of a Field object from the Data file of the current page, and specifies its target location within a table of the Export database. For Example.
SetTableName("Export_Results")
ExportFieldToColumn("VendorID","db_Number","2") 
ExportFieldToColumn("Date","db_Date")
ExportFieldToColumn("Total","db_Total")
AddRecord()
AddRecord: Inserts assembled data into the database SetTableName("Invoice")
ExportFieldToColumn("VendorID","db_Vendor")
ExportFieldToColumn("Number","db_Number")
ExportFieldToColumn("Total","db_Total")
AddRecord()

Smart Parameters and Common Operations: If an action supports smart parameters, it is specified in the action help. Smart parameters are very powerful specifications for parameters that allow access of data to and from other DCO objects and allow performing special pre-defined operations in one step.

Smart parameters can be used to dynamically obtain or create action input parameters at runtime. For example, an action could be fed the value of a field after recognition, a parameter could pull the value from a DCO variable that was set by a previous action, or a smart parameter could evaluate to the current date, the current time, the current job ID, the current operator ID, the path to the current batch that is running, and more. Smart parameter syntax can also be used to build expressions at runtime that concatenate dynamic data and static data at runtime. Smart parameters are a flexible way to provide a wide range of input to any action that supports smart parameters. For example, suppose BatchID having Value "20190402.000002". XMLSetFileName("@BatchID") will generate the xmlfile with the name of 20190402.000002 i.e 20190402.000002.xml.