Programming Guide


Chapter 10. Transaction Manager Error Messages

The transaction manager error messages are listed in alphabetical order with a possible cause and solution for each message. Those containing an error constant are stored in the Panther message file. Those without an error constant are caused by errors in SQL generation.


Transaction Manager Errors

Bad arguments (DM_BAD_ARGS)

Cause

General error. The START command was issued without a transaction name or a bad value was specified for the return code of an event function.

Action

n/a

Bad field name, #, or subscript at line line_number

Cause

Standard JPL error; generally indicates the JPL procedure or variable causing the error. One cause which is not a syntax error is using the property API to query for the value of server view, table view or link when it is not in the current traversal tree or for the value of num_key_columns when a database modification command is not in effect.

Action

Edit the JPL procedure.

Bad mode (DM_TM_BAD_MODE)

Cause

Command availability varies according to the transaction mode.

Action

  1. Refer to "Setting the Transaction Mode" in Application Development Guide for the command availability in each mode.

  2. Use the COPY_FOR_UPDATE and COPY_FOR_VIEW commands, which set the mode, when appropriate.

  3. For menu items and push buttons, set the class property which controls the active/inactive property according to the transaction mode.
Column column-name not found in table view table-view-name specified in link link-name

Cause

  1. Invalid column name specified in the link's Relations property.

  2. Parent and Child entries for the Relations need to be reversed.
Action

Edit the relations property to contain the column names which join the two table views named in the link. Check that column names exist in the corresponding Parent and Child table views.

Discard all changes? (DM_TM_DISCARD_ALL)

Cause

Transaction manger command was executed without saving the changes made to onscreen data.

Action

Choose Yes to discard changes; choose No to return to the screen so that the SAVE command can be executed.

Discard latest changes? (DM_TM_DISCARD_LATEST)

Cause

Transaction manger command was executed without saving the changes made to a portion of onscreen data.

Action

Choose Yes to discard changes; choose No to return to the screen so that the SAVE command can be executed.

Error executing database command (DM_TM_DBI_ERROR)

Cause

Error occurred while executing a command in one of Panther's database drivers.

Action

Refer to error for action.

Error in User hook function or Transaction Model (DM_TM_HOOK_MODEL_ERROR)

Cause

This error lists whether a model or function is being accessed, the name of the model or function, and the event that failed. One common usage is to display the failed event after an error has been reported from the database engine.

Action

Generally, the engine error is more descriptive of the problem

Invalid field type for Version Column (DM_TM_VC_TYPE)

Cause

Version columns must have the C Type property set to Int, Long, Float or Double.

Action

Change C Type property. As a result, database re-design might be necessary.

Invalid sort order type specified in the sort-columns edit of tableview table-view

Cause

Value entered for the sort type is invalid.

Action

Change the sort order type to ASC or DESC.

Invalid widget widget specified in the sort-columns edit of tableview table-view

Cause

The Sort Widgets property does not contain a valid widget name.

Action

Check the table view's sort_widgets property and make sure the widget is on the screen; it is the widget name and not the database column name that must be specified.

Loop in transaction manager event processing (DM_TM_EVENT_LOOP)

Cause

  1. Transaction event function specified in Function property is defined without passing it the event argument.

  2. Transaction event function has incorrect or invalid return code specified, for example, TM_CHECK instead of TM_PROCEED when no database driver statement was issued for that event.
Action

For 1, add (event) after the procedure name.

For 2, change return code.

Maximum depth exceeded

Cause

1) There is a circular link in the Parent and Child properties.

2) A link has both the Parent and Child properties set to the same table view.

Action

Check parent and child properties for each link, editing where necessary.

mode does not permit command command (DM_TM_CMD_MODE)

Cause

Command availability varies according to the transaction mode

Action

  1. Refer to "Setting the Transaction Mode" in Application Development Guide for the command availability in each mode.

  2. Use the COPY_FOR_UPDATE and COPY_FOR_VIEW commands, which set the mode, when appropriate.

  3. For menu items and push buttons, set the class property which controls the active/inactive property according to the transaction mode.
More than one row affected (DM_TM_ONE_ROW)

Cause

TM_CHECK_ONE_ROW, which calls the TM_TEST_ONE_ROW event to check that @dmrowcount is equal to 1, has been set as the return code either in the transaction model or in an event function.

Action

Change the return code in the model or event function. Change the SQL generation, for example, by expanding the primary key values so that only one row is changed. Check data in the database to make sure that duplicate key values have not been entered.

No rows affected (DM_TM_SOME_ROWS)

Cause

TM_CHECK_SOME_ROWS, which calls the TM_TEST_SOME_ROWS event to check that @dmrowcount is equal to or greater than 1, has been set as the return code either in the transaction model or in a event function.

Action

If error is valid, do nothing. Otherwise, change the return code in the model or event function.

No select columns specified, first table view table-view

Cause

For all the members of this table view, either the column_name property is blank or the use_in_select property is set to PV_NO.

Action

Set the appropriate properties for each widget.

No such command as command (DM_TM_NO_SUCH_CMD)

Cause

The syntax of sm_tm_command is incorrect.

Action

Edit the call to sm_tm_command so that a valid command name is the first parameter of its quoted command string.

No such scope as in scope (DM_TM_NO_SUCH_SCOPE)

Cause

The syntax of sm_tm_command is incorrect.

Action

Edit the call to sm_tm_command so that a valid scope parameter follows the command and table view parameters.

No such table view as in table-view (DM_TM_NO_SUCH_TV)

Cause

The syntax of sm_tm_command is incorrect.

Action

Edit the call to sm_tm_command so that a valid table view name follows the command parameter in the quoted command string.

Primary key not specified for updatable Tableview table-view (DM_TM_PRIMARYKEY)

Cause

For commands that could result in database modifications, like SELECT, NEW, COPY, or COPY_FOR_UPDATE, the transaction manager checks that primary key fields for a table view are available.

Action

Specify the table view's primary key in the primary_key property.

Root table view name not supplied or not valid (DM_TM_NO_ROOT)

Cause

  1. Table view parameter supplied with START command is not valid.

  2. More than one table view appears on a screen and there are no link widgets.
Action

For 1, edit START command specification.

For 2, create a link widget with the appropriate Parent, Child and Relations property settings.

Table name not specified for tableview table-view

Cause

Table property is blank for this table view.

Action

Enter the name of the database table in the table view's Table property. For the format needed by a specific database driver, refer to "Database Drivers."

Table name not specified for Tableview (DM_TM_TBLNAME)

Cause

Table property is blank for this table view.

Action

Enter the name of the database table in the table view's Table property. For the format needed by a specific database driver, refer to "Database Drivers."

Tableview table-view is updatable but its primary key is incomplete

Cause

For commands that could result in database modifications, like SELECT, NEW, COPY, or COPY_FOR_UPDATE, the primary key fields of an updatable table view must either be a member of that table view or one of its parent table views. It does not have to be in the direct parent, it can be in the "grandparent" table view.

Action

  1. Add the widget to the desired table view.

  2. Check the link's relations property to see if the shared fields between the table views is complete.

  3. Change the table view to non-updatable.

  4. Check the link's relations property to make sure the relation type is valid.
Transaction in progress (DM_TM_IN_PROGRESS)

Cause

sm_tm_command is being called recursively.

Action

Do not call sm_tm_command in transaction manager event functions.

Transaction model not found (DM_TM_NO_MODEL)

Cause

Model specified in table view or screen properties is not initialized.

Action

Specify valid model or leave blank to use standard model.

Transaction unspecified or unavailable (DM_TM_NO_TRANSACTION)

Cause

  1. Transaction manager command was called in an unnamed JPL procedure. Since Panther calls the unnamed JPL procedure before it calls the START command on screen entry, an error occurs.

  2. More than one table view appears on a screen and there are no link widgets.

  3. START command was not issued because of error in table view tree or because the table view parameter specified with the command was invalid.
Action

For 1, call the command after the START command has been invoked, for example, in the screen entry procedure.

For 2, create a link widget with the appropriate Parent, Child and Relations property settings.

For 3, check Parent and Child properties. Check specification of additional START commands.

Unable to synchronize server view (DM_TM_SYNCH_SV)

Cause

For all updatable table views, the transaction manager synchronizes the tableviews when a command that could modify data is issued, for example, SELECT, NEW, COPY, or COPY_FOR_UPDATE.

Action

  1. If possible, set all the members of the same table view whose use_in_update property is set to PV_YES to the same number of occurrences

  2. Change the synchronization property to PV_NO.
User event function not found (DM_TM_NO_HOOK)

Cause

The table view's Function property specifies a name that is not available either as a JPL procedure or as a prototyped function.

Action

  1. Check the value of the function property.

  2. Check the prototyped function list.

  3. Check that the JPL procedure name matches the function property and that the JPL module is available.
Version Column setting on widget is incompatible with the properties property_name

Cause

If a widget's version_column property is PV_YES, then the properties in_delete_where and in_update_where must be set to PV_NO.

Action

Set the properties to the correct values