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_getstringproperty

返回 SQL LONG VARCHAR 数据类型形式的指定消息属性。

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

LONG VARCHAR 形式的属性值。

注释

如果消息属性值超出范围,则会出现 SQL 错误 SQLSTATE 22003。

接收消息后就可以读取此属性,一直到执行回退或提交;执行回退或提交后就不能再读取此属性。

另请参见
示例

在下面的示例中,收到一条消息,并将字符串型属性 mystringproperty 的值输出到数据库服务器消息窗口:

begin
    declare @msgid varchar(128);
    declare @prop long varchar;
    set @msgid = ml_qa_getmessage( 'myaddress' );
    set @prop = ml_qa_getstringproperty( @msgid, 'mystringproperty' );
    message 'message property mystringproperty is set to ' || @prop;
    commit;
end