To display the Options screen, select the Options icon in the top left of the Rhapsody Database Configuration Editor. The Options screen enables you to configure global options:

The following tables describe the options available on this screen.

General Options

Field

Description

Commit each statement immediately

If this field is selected, the auto commit flag is set on the database connection. This means that each statement is committed immediately to the database. If this field is not selected, all statements are executed within a single transaction.

Convert missing fields to empty strings

If this field is not selected, null values are used for any field paths that are used in the configuration but do not exist.

If this field is selected, empty strings are used instead of null values if the field path does exist. In neither case does this affect any field paths where data is available.

Base64 encode binary values when converting them to strings

If this option is enabled, then values retrieved from binary columns or binary stored procedure output parameters are base64-encoded by Rhapsody if it needs to convert the values to a string. Conversion into a string is required if the binary value is:

    • Inserted into a message property.
    • Inserted into a field in the input message.
    • Used to generate an XML message containing results from a number of columns and/or rows.

The conversion does not take place if subsequent SQL queries implicitly or explicitly change the effective column type (for example, by casting the result to another SQL datatype). The conversion only occurs in the scenarios listed above, and then only when the Rhapsody database components know that the datatype is a binary type. The <columnType>  XML element can be explicitly added to the Rhapsody database configuration to assist Rhapsody to detect a binary type. In particular, conversion is not required when using the Message Body Column configuration parameter for the Database Communication Point or Database Message Extraction Filter, because in those cases the binary value is directly inserted into the Rhapsody message body without any conversion being required.

If this option is not enabled, then the binary value is instead converted into a string by UTF-8 decoding it. Unless the binary value is known to be a UTF-8 encoded string, this is not an appropriate selection and may result in runtime errors if the value cannot be converted.

Allow dynamic table and column names in SQL statements This option must be enabled to allow the use of dynamic table and column names in SQL statements. Refer to Using Dynamic Table and Column Names for details.

Output Message Options

These options are only available when the component is in the Input mode.

Field

Description

Use attributes for column names

If this field is not selected, the name of the XML element is the name of the column itself. If this field is selected, the column XML element is called 'column', and the 'name' attribute contains the actual column name. For example, <column name="firstName">.

Use attributes for row names

If this field is not selected, the name of the XML element is the name of the statement. If this field is selected, the XML element is called 'row', and the 'name' attribute contains the name of the statement. For example, <row name="main">.

Use attributes for values

If this field is not selected, the value retrieved from the database is contained as the XML element value (that is, between the tags). If this field is selected, the 'value' attribute contains the data instead. For example, <column name="firstName" value="Bloggs"/>.

Number of rows used to generate a message

This is the number of rows returned from the root statement used to generate an XML message. Generally this is left as the default value of 0, which means that a single XML message is generated for all the new rows in the table. Changing this value limits the number of rows that will be included in each XML message. For example, setting this value to 1 causes a separate XML message to be generated for each row.

 

XML Message Generation

The structure of the XML message mirrors the structure of the database configuration, so statement groups in the generated XML message will be nested according to how the statements are nested in the configuration. The Output Message Options enable you to modify the structure of the generated XML message.

The Database communication point running in input mode and the database message extraction filter both generate XML messages corresponding to the result sets returned by the database. This XML message can then be processed by Rhapsody normally.

The general form of the generated XML message is as follows:

<message>
 <statementName1>
  <columnName1>column value</columnName1>
  <columnName2>column value</columnName2>
  <columnName3>column value</columnName3>
  ... 
 </statementName1>
 <statementName2>
  <columnName1>column value</columnName1>
  <columnName2>column value</columnName2>
  <columnName3>column value</columnName3>
  ... 
 </statementName2>
 <statementName3>
  <columnName1>column value</columnName1>
  <columnName2>column value</columnName2>
  <columnName3>column value</columnName3>
  ... 
 </statementName3>
</message>