This property opens a dialog where you can specify the table, procedure or SQL statement to be used for inserting data submitted via the form. This method can be used when the standard insert functionality based on the form's data source is insufficient. For example you may not want to insert all fields, or replace field values submitted by the form.
The main part of the Custom Insert dialog is the Parameters section where you configure parameters that construct the SQL query statement, or variables used in custom SQL statement, or Stored Procedure parameters. To open the parameter configuration dialog click the plus button ([+]) or double click an existing parameter.
When using Table type custom insert the following parameter dialog will appear:
The following table parameter configuration values are available:
Field | ||
---|---|---|
Name | Provide the name of the data field you want to insert a value into. | |
Type | Select the type of the data field. | |
Format | Specify data field's format. | |
Parameter | ||
Name | Designate a parameter whose value will be assigned to the data field. | |
Type | Select parameter type. | |
Format | Specify parameter format. | |
If parameter is empty | Parameter is considered empty when parameter source collection does not contain corresponding item. This may happen, for example, when the parameter is not submitted by the form or if the code expression it is based on returns a null value. | |
Do not insert field | If parameter value is empty the corresponding field won't be inserted (won't be included into the SQL INSERT statement). | |
Use value | If parameter value is empty the specified value will be used. |
When configuring custom insert property you may specify your own SQL INSERT
statement to be executed after the form is submitted. The SQL statement can
include variables in curly braces, such as {variable_name}, which will be
replaced at run-time by the corresponding parameter that you must configure with
the same name as each variable used in the SQL statement. For example if
an SQL statement is INSERT INTO departments(department_name)
VALUES('{name}') , then the corresponding name parameter must
be created and configured.
To open the parameter configuration dialog click the plus button ([+]) or double
click an existing parameter.
The following SQL parameter configuration values are available:
Field | ||
---|---|---|
Name | Provide the name of the data field you want to insert a value into. | |
Type | Select the type of the data field. | |
Format | Specify data field format. | |
Parameter | ||
Name | Designate a parameter whose value will be assigned to the data field. | |
Type | Select parameter type. | |
Format | Specify parameter format. | |
Default Value | The default value to be used if parameter value is empty. |
Parameter configuration options are similar to the above SQL parameters except for additional properties, such as Data Size, Direction, Scale and Precision. Those additional options corresponds to the stored procedure parameters within your database.