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

SQL Anywhere 10.0.1 » QAnywhere » QAnywhere SQL API Reference » Message properties, headers, and content » Message properties

ml_qa_getpropertynames Next Page

ml_qa_getshortproperty


Returns the specified message property as a SQL SMALLINT data type.

Parameters

Item

Description

Remarks

1

Message ID

VARCHAR(128). You can obtain the message ID from ml_qa_createmessage or ml_qa_getmessage.

2

Property name

VARCHAR(128)

Return value

The property value as SMALLINT.

Remarks

If the message property value is out of range, then a SQL error with SQLSTATE 22003 occurs.

You can read this property 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 value of the short property myshortproperty is output to the database console:

begin
    declare @msgid varchar(128);
    declare @prop smallint;
    set @msgid = ml_qa_getmessage( 'myaddress' );
    set @prop = ml_qa_getshortproperty( @msgid, 'myshortproperty' );
    message 'message property myshortproperty is set to ' || @prop;
    commit;
end