Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Advantage CA-Clipper Guide v6.11 - ax_exprerror() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_ExprError()
 Error status of last evaluated expression by the Advantage Expression Engine
------------------------------------------------------------------------------

 Syntax

     AX_ExprError() -> numeric

 Returns

     Returns a numeric value representing the error status of the last
     command evaluated by the Advantage Expression Engine.

 Description

     This function returns the error status of the last expression
     evaluated by the Advantage Expression Engine.  The Expression Engine
     is used to parse and evaluate expressions in certain CA-Clipper
     commands, such as INDEX and SET FILTER, so that these commands can
     be performed completely on the server.  Some expressions, including
     those with UDFs or memory variables, cannot be evaluated on the server.
     Because of this limitation, an error is generated showing that the
     expression could not evaluated by the server.

     If the expression cannot be evaluated by the Expression Engine, the
     command containing the expression is performed on the client.
     Performance of commands on the client is much worse than if those
     commands are performed on the server due to increased network traffic.

     The returned error codes are designed to provide information to the
     specific failure.  If a zero is returned from the AX_ExprError(), then
     no error occurred in the last command evaluated by the Advantage
     Expression Engine. To determine if the command was executed on the
     server or client, you should call AX_ExprError() to verify the
     Expression Engine status.

     Expression errors are defined in the 3000 and 4000 error code classes.
     Refer to Advantage Errors for specific error codes.

 Example

     local cMemVar := 24

     USE test VIA "DBFNTXAX"
     INDEX ON lastname + firstname TO good

     ? AX_ExprError()     // Returns zero indicating index was built on
                          // the server.

     INDEX ON empid + cMemVar TO bad

     ? AX_ExprError()     // Returns error code 3011 indicating the
                          // expression contained a memory variable and
                          // could not be evaluated by the Advantage
                          // Expression Engine.  The index was, thus, built
                          // on the client.


See Also: AX_ExprEngine() AX_ExprValid()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson