A Server Engine component must be placed on the main form for any application using a "local" (embedded) server.  Default values are shown in the object inspector snapshot.

Icon

nxServerEngine1

Properties and Events view

DelphiGuide_nxServerEngine1     DelphiGuide_nxServerEngine1(a)

                                                             

Purpose

The TnxServerEngine component contains all of the database server functionality.  It is only required on the form, however, when using an embedded server or creating a custom server.  To create a database application, either a TnxServerEngine or TnxRemoteServerEngine component needs to be placed on the form.

The TnxServerEngine is responsible for all navigational database access and manipulation as well as opening and closing files, folders etc. Any access to the database using queries, needs an additional TnxSQLEngine included and linked to via the SQLEngine property.

Only one TnxServerEngine or TnxRemoteServerEngine component is needed per application, regardless of how many threads are used.  These engines are threadsafe for multithreaded applications.

Key Properties

MaxRAM

The maximum amount of RAM to be reserved for use by the buffer manager.  If this value is set to 0 or –1, then half the available physical RAM will be used.  Otherwise, the amount specified, in MegaBytes, will be used.

Options

As default the options are st to false. Activating the options has this effect:

seoReadOnly - forces all data access to be readonly (eg when running an app from CD-ROM)

seoForceFailSafe - force the use of failsafe transactions

seoCloseInactiveFolders - Release server objects that references database folders as soon as nothing accesses them

seoCloseInactiveTables - Release server objects that references database tables (physical files) as soon as nothing accesses them

seoInMemOnly - forces the server engine to use in memory tables

seoIsSecure - requires named users to be defined and logging in

SQLEngine

Connect to a TnxSQLEngine component.  This is necessary if you are using a TnxQuery component in your single exe application.

TempStorePath

System path used for the internal temporary storage.  If blank, then the user's operating system default temp path is used.

TempStoreSize

This is the size, in MegaBytes, of the temporary storage area on disk.  If blank or –1, then it is set to the minimum of (a) 10 times MaxRAM, (b) one-third the available disk space, or (c) one-third the maximum possible file size of the filesystem.  Temp storage is used by the buffer manager if RAM requirements exceed the value of MaxRAM.  This is likely to happen if you use large SQL's or very big transactions.  In such cases make sure that adequate temp storage has been allocated. It is strongly recommended that you ensure enough space has been set aside for the first two categories.

Note: The temporary storage files are created with a filesystem flag that makes the OS delete them when the creating process terminates. If you have unexpected shutdowns of the machine, OS or your programs, then the temporary storage files might be left on disk and not cleaned up. To see where the temp path of a windows system is, and what files are stored there, issue the following at a command prompt:

DIR /AH  %TEMP%

Please also see Common Properties and Events for more details.

Home | Site Contents | Documentation | NexusDB Manual V4 | Delphi Guide | VCL Component Overview | Server Engines and Monitors