ml_qa_getexpiration

Returns the expiration time of the message.

Parameters
Item Description Remarks
1 Message ID VARCHAR(128). You can obtain the message ID from ml_qa_createmessage or ml_qa_getmessage.
Return value

The expiration time as TIMESTAMP. Returns null if there is no expiration.

Remarks

After completion of ml_qa_putmessage, a message expires if it is not received by the intended recipient in the specified time. The message may then be deleted using default QAnywhere delete rules.

You can read this header after a message is received and until a rollback or commit occurs; after that you cannot read it.

See also
Example

In the following example, a message is received and the message expiration is output to the database server messages window:

begin
    declare @msgid varchar(128);
    declare @expires timestamp;
    set @msgid = ml_qa_getmessage( 'myaddress' );
    set @expires = ml_qa_getexpiration( @msgid );
    message 'message would have expired at ' || @expires || ' if it had not been received';
    commit;
end