ml_qa_createmessage

Returns the message ID of a new message.

Return value

The message ID of the new message.

Remarks

Use this stored procedure to create a message. Once created, you can associate content, properties, and headers with this message and then send the message.

You can associate content, properties, and headers using any of the QAnywhere stored procedures starting with ml_qa_set. For example, use ml_qa_setbinarycontent or ml_qa_settextcontent to create a binary or text message.

See also
Example

The following example creates a message, sets the message content, and sends the message to the address clientid\queuename:

begin
    declare @msgid varchar(128);
    set @msgid = ml_qa_createmessage();
    call ml_qa_settextcontent( @msgid, 'some content' );
    call ml_qa_putmessage( @msgid, 'clientid\queuename' );
    commit;
end