Progress
ADM 2 Reference
addMessage (smart.p)
Inserts the message text into a data message log along with its Field, and Table if known.
Parameters:INPUT pcText AS CHARACTER
Text of the message.
INPUT pcField AS CHARACTER
The field name for which the message occurred, if it was related to a specific field.
INPUT pcTable AS CHARACTER
The database table for which the message occurred, if it was related to an update to a database table.
Returns: Nothing (procedure)Notes:
- If pcText is unknown (?), that signals that this function should retrieve messages from the error–status system handle.
- The message log is a character string in a special format intended to be decoded with the functions fetchMessages or showDataMessages.
- Message texts that are intended to be seen by end users can be enabled for translation into other languages by putting them into the application code as quoted strings, and then using the Translation Manager tool. Generally, ADM messages which are expected to be seen by developers, for example, messages that indicate errors in the application design, are entered into the ADM super procedures as quoted strings with the :U suffix so that they will not be seen by the Translation Manager tool.
- If the unknown value (?) is passed as the message text value, then addMessage will retrieve as many error messages as are stored in the ERROR–STATUS handle using the GET–MESSAGE method. This would be appropriate, for example, after executing a database access statement NO–ERROR, then checking the value of ERROR–STATUS:ERROR.
Examples:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |