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_loaded() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_Loaded()
 Verifies if the Advantage Database Server is started/loaded
------------------------------------------------------------------------------

 Syntax

     AX_Loaded( <cFileSpec> ) -> logical

     <cFileSpec> A character string representing either the logical drive
     or the server and share/volume name of the server where the Advantage
     Database Server may be running. If the server and share/volume name
     are given, it must be specified as "\\SERVER\SHARE" or "SERVER/VOLUME".
     If a drive letter is used, it must be in the form "N:" where the colon
     (:) is required.

 Returns

     Returns a logical value.  If the Advantage Database Server is
     started/loaded on the specified drive or server, .T. is returned.
     If not, .F. is returned.

 Description

     AX_Loaded() checks the server specified by the drive letter or the
     server and share/volume to see if the Advantage Database Server is
     started/loaded on that server.

     Note: This function may take up to two seconds to fail if the
     the specified server does not have the Advantage Database Server
     started/loaded.  Thus, for best performance, it is recommended this
     function not be used before every table open operation.  Instead,
     call AX_Loaded() once near the beginning of the application and store
     the result into a global variable. Use the result stored in that
     global data in later "open table" operations to determine whether to
     open a table with an Advantage RDD or a local RDD.

 Example

     SET DEFAULT TO n:\dbf

     // Check to see if the Advantage Database Server is available on the
     // server that is mapped to the logical N drive.
     ? AX_Loaded( "N:" )                  // Returns .T. if Advantage is
                                          // available on the server mapped
                                          // to drive N:

     // Assume the Advantage Database Server is started/loaded on SERVER1
     // but not on SERVER2. Check to see if Advantage is started/loaded
     // on server SERVER1 & SERVER2
     ? AX_Loaded( "\\SERVER1\SHARE" )     // Displays .T.
     ? AX_Loaded( "\\SERVER2\SHARE" )     // Displays .F.

     // This is how the Advantage AUTOUSE command verifies Advantage Database
     // Server existence.  This will check the SET DEFAULT value.
     ? AX_Loaded( AX_GetDrive( "CUST.DBF" ) )


See Also: AX_GetDrive() AX_Driver()

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