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. This action has been deprecated and is scheduled to be removed in a future release. It is recommended that you no longer use this action. Instead, use the ExportToColumn action in the ExportToDatabase action library.

Syntax

bool ExportToColumn (strParam)

Parameters

Two comma-separated values:
  1. The name of the database column that will hold the value of the current field.
  2. Optional: Can be set to the numerical value of 1, 2, or 3. If this parameter is not specified, quotes will be placed around the value in the SQL query to update the table.

Setting the value to 1 causes this action to return False if the Table name is invalid; otherwise the error will not be discovered until the action that performs the DB insert call, such as an AddRecord action, is called. This value would typically only be used in a development environment as it will increase processing time.

Setting this value to 2 allows NULL column values and inserts no quotes around values (for numeric) in the SQL query to update the database.

Setting the value to 3 allows NULL and if the column value is not NULL, the column value will be surrounded in quotes in the SQL query to update the database.

Returns

False if:
  1. There is no connection to the database.
  2. The column identified by the parameters does not exist.
  3. A SetTableName action was not previously used.

Otherwise, True.

Level

Field level only.

Details

This field-level action 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. Optionally, it can assign a Style to the action.
Example:
Batch Level:
ExportOpenConnection("@APPVAR(values/dsn/exportdb:cs")
SetTableName("Export_Results")

Current field:
ExportToColumn("db_Date,3")

Last Field:
AddRecord()

This example exports the captured value of the Field object to which the rule applies, from the Data file of the current page to the db_Date column of the Export_Results table, within the Export database.

It also uses the second, optional parameter value to assign a Style to the action.