ml_qa_getbinarycontent

Returns the message content of a binary 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 message content as LONG BINARY.

If the message has text content rather than binary content, this stored procedure returns null.

You can read this content 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's encrypted content is decrypted and output to the database server messages window:

begin
    declare @msgid varchar(128);
    declare @content long binary;
    declare @plaintext long varchar;
    set @msgid = ml_qa_getmessage( 'myaddress' );
    set @content = ml_qa_getbinarycontent( @msgid );
    set @plaintext = decrypt( @content, 'mykey' );
    message 'message content decrypted: ' || @plaintext;
    commit;
end