Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » QAnywhere » QAnywhere 参考 » QAnywhere SQL API 参考 » 消息属性、标头和内容 » 消息属性

 

ml_qa_setshortproperty

用 SQL SMALLINT 数据类型设置指定消息属性。

参数
说明 注释
1 消息 ID VARCHAR(128)。可从 ml_qa_createmessage 或 ml_qa_getmessage 获取消息 ID。
2 属性名称 VARCHAR(128)
3 属性值 SMALLINT
注释

消息发送后就不能再更改此属性。

另请参见
示例

在以下示例中,创建一条消息,设置短整型属性 myshortproperty1 和 myshortproperty2,然后将消息发送到地址 clientid\queuename:

begin
    declare @msgid varchar(128);
    set @msgid = ml_qa_createmessage();
    call ml_qa_setshortproperty( @msgid, 'myshortproperty1', -12345 );
    call ml_qa_setshortproperty( @msgid, 'myshortproperty2',  12345 );
    call ml_qa_putmessage( @msgid, 'clientid\queuename' );
    commit;
end