[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FN_PFEVAL()
 Set preferred server and eval block
------------------------------------------------------------------------------
 Syntax
 
      fn_pfEval( xID, bBlock ) -> xRet
 
 Arguments

     <xID> can be numeric, or a character.

     If it's numeric, it is the connection ID of the server you want
     to set to before evaluating <bBlock>.  This is is position of
     the server in the server name table. You can use FN_FSNAME()
     to find a connection ID, given a server name.  If the
     connection ID is invalid, the current connection ID is used.

     If it's a character, it is the _name_ of the server you want
     to set to before evaluating <bBlock>.  If the server name is
     invalid or not found, the current server is used.

     <bBlock> is a code block to evaluate.

 Returns

     <xVal>, whatever is returned from the block when it is
     evaluated.

 Description

     Some APIs require you to set to a preferred connection ID first
     before they can be executed.  This call just simplifies the
     process of getting the old ID, setting the new one, doing
     something, then resetting the old ID.

     This function records the state of fn_error() after evaluating
     the block and makes sure it stays that way before returning.
     Therefore, you can't really know whether or not the calls to
     change the preferred server back and forth are working or not,
     as there is no way to access their return values.

 Examples


 Source: N:\SRC\MISC\FNPFEVAL.PRG

 Author: Glenn Scott

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson