QueryWhereStmtFormat

Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.

Obselete

SalString QueryWhereStmtFormat(SalString lsMessage)

QueryWhereStmtFormat formats a where statement. This method is called from the query dialog to format the actual where statement from user input in the query dialog.

Parameters

Name Description
SalString lsMessage Attributes to build the where statement from. Supplied format should be of packed cMessage type. ITEM - A PackArrayUnit ( CHAR_US delimited ) string of all included column names. VALUE - A PackArrayUnit ( CHAR_US delimited ) string of all values to be processed. ALIAS - Optional attribute that can be used in situations where the DbColumnName should be substituted with a column alias in the completed where statement. Syntax should be COLUMN;ALIASCASE - This attribute specifies if the query should be case sensitive or not. Valid values are 'true' or 'false'. This attribute is optional and will be defaulted to true.
 

Returns

The created where statement or 'NoQuery' if the function fails to process the message in any way.

Comments

If a DbColumn specified as an attribute is not found in the current datasource. The return value will be 'NoQuery'.

Example

need to get C# sample

Set sItemArray[0] = 'COMPANY_ID'

Set sItemArray[1] = 'ORDER_NO'
Set sValueArray[0] = '01'
Set sValueArray[1] = '1000'
...
Call Msg.AddAttribute( 'ALIAS','COMPANY_ID;SITE' );
Call Msg.AddAttribute( 'ITEM',PackArrayUnit( strNULL, 
sItemArray );
Call Msg.AddAttribute( 'VALUE', PackArrayUnit( strNULL,
sValueArray );
Call QueryWhereStmtFormat( Msg.Pack( ) )
This will result in a where statement like 
SITE = '01' AND ORDER_NO = '1000'