NetWare Btrieve Applications on a Server

A NetWare Btrieve application running on a server (that is, a Btrieve-based application running as an NLM) can access data on the local server or on a remote server, as follows:

The following sections describe the events that occur when a Btrieve-based application running as an NLM on a NetWare server makes local and remote requests.


Server Application Accessing Local Data

When an application running on a server accesses data stored on that server, the Btrieve NLM must also be loaded on that server. The following steps describe accessing data stored on the local server:

  1. The application sends a request to the Btrieve NLM. If the Message Router (BROUTER.NLM) is not loaded, the call is made directly to the exported entry point of Btrieve on the local server.

    If the Message Router is loaded, it relays the call to Btrieve on the local server.

  2. Btrieve processes the request using the Btrieve library of function calls.
  3. If the Message Router is not loaded, Btrieve returns the appropriate data and status code directly to the calling application.

    If the Message Router is loaded, Btrieve returns the data and status code to the Message Router. The Message Router then transports the data and status code to the calling application.


Server Application Accessing Remote Data

When an application running on a local server accesses data stored on a remote server, both the Message Router and the Btrieve NLM must be loaded on the local server, and BSPXCOM and the Btrieve NLM must be loaded on the remote server. The following steps describe accessing data on a remote server:

  1. The application (running on the local server) makes a request to access a Btrieve file stored on a remote server.
  2. The Message Router on the local server detects that the request is for a remote Btrieve file and sends the request to BSPXCOM on the remote server.
  3. BSPXCOM (remote) relays the request to the Btrieve NLM (remote) by making Btrieve function calls.
  4. The Btrieve NLM (remote) returns the appropriate data and status code to BSPXCOM (remote).
  5. BSPXCOM (remote) returns the data and status code to the local server, where the Btrieve request originated.
  6. The Message Router (local) returns the results to the calling application (local).

    The Message Router places the results in the application's memory at the location designated by the parameters passed to Btrieve in the function call. Control then returns to the calling application.