# String Database Example Programs

Topics
Overview | LAN DB

Overview

The following example programs were created with the String Database API. There are two versions of each application: a wxWindows version and a Curses version. Each version shares the same user interface.

Local Area Network Database

The LAN Database is used to maintain a list of detailed network configurations for all the machines on a specific subnet. For detailed instructions on using the wxWindows program, see the wxWindows User Interface page. For detailed instructions on using the Curses program, see the Curses User Interface page.

BUILD INSTRUCTIONS

:
The files needed to build the executables are located in the "examples" subdirectory under "landb". See the String Database page for build instructions.

DIRECTORY CONTENTS

:
The "landb" directory contains several subdirectories:

    bin      - Binary directory for the program executables.
    config   - DB configuration used to customize before compiling.
    curses   - Makefiles for the Curses version.
    db_files - Default location for the data file and the index file.
    wxwin    - Makefiles for the wxWindows version.

CONFIGURATION FILES

:
Each version shares a common program configuration file. The "bin" subdirectory is the default location for the configuration file.

    landb.ini(DOS, Windows 95 configuration file)
    _landb   (UNIX configuration file, must rename to .landb)

This program will search for its configuration file in the directory where it was executed. If the program cannot find its configuration file, it will search the environment for the LANDBCFG variable. The LANDBCFG is used to tell the program where its configuration file is if it is located in a different directory. The following are some examples on how to set a path to the program configuration file in the environment:

    POSIX compatible shell under UNIX:
    LANDBCFG=/apps/vbdbase/examples/landb/bin/.landb
    export LANDBCFG

    C shell under UNIX:
    setenv LANDBCFG /apps/vbdbase/examples/landb/bin/.landb

    Under DOS, Windows 95:
    set LANDBCFG=C:\vbdbase\examples\landb\bin\landb.ini

DATABASE FILES

:
The "db_files" subdirectory is the default location for the database files. The program uses both a data file and an index file. The data file named "landb.pod" stores the database and the index file named "landb.btx" stores the location of each object in the data file. Both the names and location of the database files can be changed in the program's configuration file. You can use any text editor to edit the program's configuration file.

WELCOME MESSAGE

:
The program's welcome message is only used in the Windows version. A file named "welcome.txt", located in the "bin" subdirectory by default, contains the program's welcome message. The welcome message is used to display program information when the program first starts. Both the name and location of the welcome message can be changed in the program's configuration file. You can use any text editor to edit the program's configuration file and welcome message.

End Of Document